3 ms·
The old behavior was the bad one; the new behavior is good. And that link explains why very well. I guess I should have figured that oblique references to "ls
by chubot 7y ago
The old behavior was the bad one; the new behavior is good. And that link explains why very well.
I guess I should have figured that oblique references to "ls quoting fiasco" is shorthand for "I don't understand what's wrong but I'm angry about it..."
(On the other hand I would say the grep -a issue is bad both before and after because either way it relies on autodetection. The fundamental issue there is that there is too much variance in encodings, which isn't easy to fix. Luckily UTF-8 is growing in popularity, and it doesn't have this issue because it doesn't require metadata for extremely common operations like "find ascii substring".)
- _jal 7y ago> but I'm angry about it. Take it to Reddit. I know perfectly well what's going on, and also know better then to discuss it with people who act like that.
- wruza 7y ago”The old behavior was the bad one; the new behavior is good” If you’re a human, yes. If you’re a script, it breaks you in half. If you’re a script that has to run on various versions, then maybe it’s time fix yourself and use find. You’re a sophisticated script after all, not one of these who require a human with a debugger. Modern culture may not appreciate that little ‘compat’ thing, but it is essential if you want something to continue to work and not just stop and wait for someone’s educated guesses. Good software doesn’t point fingers at you, it just works. I remember how recently I wanted to check network interfaces on some machine and commanded ‘ifconfig’. Now it’s called ‘ip a’, and there is no ifconfig. I can guess the reason – ifconfig was bad and ip is good. There is also an eternal “FAT” label issue in unetbootin app, which resurrects every time Apple changes its fdisk output format (in every release, as it seems). The workaround is to run it with a cli option – a very thing that unetbootin was created for to skip. This is what makes systems so much fun. Without all these cool things, we would just sit there and cry over our uselessness. ed: I read below that ls does that in interactive mode only, maybe it’s not that bad then.
- steerablesafe 7y agoHats off if your script used ls and handled weird characters in filenames just fine.
- foldr 7y agoA script will see the old-style output. The new-style output is tty only
- int_19h 7y agoYou can't just expect compatibility about random things - that's why we have formal contracts: standards, specifications, documentation. A human-readable output of any app, in particular, should never be assumed to be stable, or to have a specific format (even if observations imply it), unless its docs specifically say otherwise.