Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Tuesday December 01 2015, @07:50PM   Printer-friendly
from the features-are-beneficial-bugs dept.

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

Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by darkfeline on Wednesday December 02 2015, @03:05AM

    by darkfeline (1030) on Wednesday December 02 2015, @03:05AM (#270464) Homepage

    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!
    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 2) by Marand on Wednesday December 02 2015, @08:04AM

    by Marand (1081) on Wednesday December 02 2015, @08:04AM (#270529) Journal

    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

      by Anonymous Coward on Wednesday December 02 2015, @01:28PM (#270622)
      Perhaps in a parallel universe it's possible to use parallel in parallel with parallel. ;)
    • (Score: 2) by VLM on Wednesday December 02 2015, @01:44PM

      by VLM (445) Subscriber Badge on Wednesday December 02 2015, @01:44PM (#270633)

      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

        by Marand (1081) on Wednesday December 02 2015, @07:52PM (#270872) Journal

        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

      by darkfeline (1030) on Thursday December 03 2015, @01:32AM (#271084) Homepage

      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

        by Marand (1081) on Thursday December 03 2015, @06:43AM (#271229) Journal

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