mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-20 04:26:04 +08:00
feat(nsh_cat): allow cat to read from stdin
Now, if we run cat without arguments, it will just read from stdin. It can be used with redirect like `cat < infile > outfile`.
This commit is contained in:

committed by
Alan Carvalho de Assis

parent
4104019e1c
commit
8fba726a7d
@@ -158,8 +158,8 @@ static const struct cmdmap_s g_cmdmap[] =
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NSH_DISABLE_CAT
|
||||
CMD_MAP("cat", cmd_cat, 2, CONFIG_NSH_MAXARGUMENTS,
|
||||
"<path> [<path> [<path> ...]]"),
|
||||
CMD_MAP("cat", cmd_cat, 1, CONFIG_NSH_MAXARGUMENTS,
|
||||
"[<path> [<path> [<path> ...]]]"),
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DISABLE_ENVIRON
|
||||
|
Reference in New Issue
Block a user