We make very careful considerations about the interface and operation of the GNU coreutils, but unfortunately due to backwards compatibility reasons, some behaviours or defaults of these utilities can be confusing.
This information will continue to be updated and overlaps somewhat with the coreutils FAQ, with this list focusing on less frequent potential issues.
Good tips and reminders for those who don't work mostly with a CLI (Command Line Interface).
[What has been YOUR biggest CLI gotcha? -Ed.]
(Score: 2) by darkfeline on Wednesday December 02 2015, @03:05AM
I use GNU Parallel now instead of xargs, much better in my opinion, especially not having the fudge about with whitespace handling.
Join the SDF Public Access UNIX System today!
(Score: 2) by Marand on Wednesday December 02 2015, @08:04AM
Parallel is a gotcha in and of itself, because there are two separate versions of it that have different behaviours and arguments, at least in Debian. One is part of the "moreutils" package, while the GNU one (which is awesome) is its own standalone package named parallel. You can't have both installed because they both want /usr/bin/parallel, so if you need anything else that's in moreutils, you're stuck with the shittier version of parallel.
The right solution would be to have parallel.gnu and parallel.moreutils and use Debian's alternatives system to make a symlink, or split parallel out of moreutils and let the user choose which one to keep, but it's been an issue since 2010 and as far as I know is still an ongoing source of bullshit, finger-pointing, and ego clashes even now. (It may have been corrected now, but when I last checked earlier this year it was still a problem...)
(Score: 1, Funny) by Anonymous Coward on Wednesday December 02 2015, @01:28PM
(Score: 2) by VLM on Wednesday December 02 2015, @01:44PM
I don't even use Debian anymore, mostly freebsd, but I found this
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749355 [debian.org]
Usually these kind of things are resolved a little quicker.
(Score: 2) by Marand on Wednesday December 02 2015, @07:52PM
Yup, I was following that for a while and it had no sign of improvement up to about March of this year. It looks like progress i'd belong made finally but they're still stuck on the same problems because the gnu one deprecated the compat switch that makes it work like the other, the other doesn't care anout the gnu one, and nobody can agree on how to deal with that.
One reason this has dragged on for so long is the old maintainer, Joey Hess, got pissy over someone bringing in the technical committee after he failed to do anything with the problem for a while. He complained about it being a time problem not a technical one, objected to their involvement, and abandoned the package in a huff of 'screw you i'm taking my ball home'
(Score: 2) by darkfeline on Thursday December 03 2015, @01:32AM
That sounds like a problem with Debian and perhaps moreutils, which, in addition to having a bad maintainer, isn't very useful last I checked. Especially sponge, which can be easily done with regular shell IO redirection.
Join the SDF Public Access UNIX System today!
(Score: 2) by Marand on Thursday December 03 2015, @06:43AM
Oh, it is, definitely. It's a huge potential gotcha though, I had moreutils installed for vipe (insert text editor into a pipe chain) and went to use parallel one day and the much-inferior moreutils parallel caused me no end of trouble. I figured out the problem, went to install the gnu one, and that opened a whole new can of worms with the conflicts. I decided parallel was more useful than all of moreutils, though, so I just tossed moreutils to the bin over the whole nonsense.
Still, It's nothing but pain if you don't realise, especially if you learn about parallel from a website or person that doesn't mention there's an inferior version floating around...