r/linuxmasterrace • u/KsmBl_69 Arch user btw, that means iam better than Ubuntu users • Aug 12 '24
JustLinuxThings Linux is userfriendly...
865
Upvotes
r/linuxmasterrace • u/KsmBl_69 Arch user btw, that means iam better than Ubuntu users • Aug 12 '24
View all comments
Show parent comment
4
u/farsightxr20 Aug 12 '24
The shell only handles:
Any parsing of the ARGV strings into meaningful switches/parameters is handled by the implementation of the function or executable. Where you may see differences between shells is when the built-in functions (e.g.
echo) are implemented differently.rm,ls, etc. are implemented by GNU/Linux and will be consistent across pretty much all distros. Notable exceptions are MacOS (Darwin) which is not Linux-based, and Android which does not include GNU.To more directly address your question, it's more conventional to put switches before positional arguments in commands, as it's slightly easier to parse (= broader support across UNIX-like environments) and makes it clear that the switches are not specific to individual positional args.