3 ms·
I'd be interested in learning which commands you have in mind and what specifically is a bit nicer about their coreutils implementation.
by 1500100900 3y ago
I'd be interested in learning which commands you have in mind and what specifically is a bit nicer about their coreutils implementation.
- orra 3y agoIn GNU utilities, option arguments can come after (or between) positional arguments. Personally I find this small convenience invaluable, because I'm used to it.
- usr1106 3y agoOh, I had no idea that GNU utilities allow this. As a Unix graybeard I always place options first. Options last feels like Windows command prompt, so nothing I want to see... I always tell younger colleagues who place options in the end, it might work with some commands, but just don't do it. I did not know that "some" includes all of GNU coreutils? A single common code style is a virtue, even in interactive use if there are onlookers. So I guess I will continue to point it out.
- mike_hock 3y agoEven many command line parsing libraries support it and scan the entire argv for options. You should always terminate the options with "--" if it's in a script and any of the positional arguments are variables that might or might not start with a dash.