Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I tend to install coreutils on FreeBSD. Besides some minor annoyance with every command being prefixed with "g", some of the programs work a bit nicer than the FreeBSD-shipped versions (or some Linux-centric programs just want the coreutils versions...).


I'd be interested in learning which commands you have in mind and what specifically is a bit nicer about their coreutils implementation.


In GNU utilities, option arguments can come after (or between) positional arguments. Personally I find this small convenience invaluable, because I'm used to it.


Oh, 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.


Even 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: