All NSH commands that accept a path name differ from the corresponding commands in other shells such as Bash in at least one important way:
Shells like Bash accept a REGEX pattern matching string. For example, rm dat*[0-9][.]log would delete all .log files in the current directory with names like datNNN, where NNN is some decimal number. Another example,rm * would delete all non-hidden files in the current working directory (not strictly REGEX).
In NSH, the argument is the path to a file or directory.
This means the commands like rm * fail because * is not expanded into a list of file/directory names.
NSH has much of the look and feel these larger shells so any behavioral difference can be confusing. And sometimes there there is no simple alternative to the Bash-like command. There has been discussion recently, for example, on how to do rm * without *.
A solution would affect all NSH commands with path arguments. That would have to be reinterpreted as a REGEX match pattern and every file in the directory path would have to compared against the pattern and added to a list of paths to be operated on.
NOTE that arguments like *, ., and .. are not REGEX and might have to be handled in a different way.
All NSH commands that accept a path name differ from the corresponding commands in other shells such as Bash in at least one important way:
Shells like Bash accept a REGEX pattern matching string. For example,
rm dat*[0-9][.]log
would delete all .log files in the current directory with names like datNNN, where NNN is some decimal number. Another example,rm *
would delete all non-hidden files in the current working directory (not strictly REGEX).In NSH, the argument is the path to a file or directory.
This means the commands like
rm *
fail because*
is not expanded into a list of file/directory names.NSH has much of the look and feel these larger shells so any behavioral difference can be confusing. And sometimes there there is no simple alternative to the Bash-like command. There has been discussion recently, for example, on how to do
rm *
without*
.A solution would affect all NSH commands with path arguments. That would have to be reinterpreted as a REGEX match pattern and every file in the directory path would have to compared against the pattern and added to a list of paths to be operated on.
NOTE that arguments like
*
,.
, and..
are not REGEX and might have to be handled in a different way.