You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 dat_NNN_, 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.
The text was updated successfully, but these errors were encountered:
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 dat_NNN_, 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.The text was updated successfully, but these errors were encountered: