3 ms·
This seems like a similar issue to how `sed` is implemented slightly differently on OSX/Darwin systems and Linux systems. How have those communities dealt with
by chatmasta 10y ago
This seems like a similar issue to how `sed` is implemented slightly differently on OSX/Darwin systems and Linux systems.
How have those communities dealt with the problem? Or is this a totally off base comparison?
- deleted 10y ago[deleted]
- phicoh 10y agoSed predates Linux (by a very long time). There is an opengroup standard for sed: http://pubs.opengroup.org/onlinepubs/7908799/xcu/sed.html http://pubs.opengroup.org/onlinepubs/7908799/xcu/sed.html As long as the OSX version of sed conforms to the standard there is no problem if it is incompatible in some areas with the GNU version used on Linux.
- blumentopf 10y agoTotally off base. BSD versus GNU conventions.
- JdeBP 10y agoIf you think that that does not, similarly, generate long "But it breaks my scripts!" "Your scripts were wrong." "You should have named the right shell interpreter." "BSD commands are insane." "GNU commands are non-standard." "Are you going to fix all of the scripts that currently rely upon this?" "But this is the de facto standard!" "Have you forgotten about this large userbase over there?" "I don't care what you say, as far as I am concerned this is bash." "I don't care what you say, it's Terminal because I use a terminal to type." "It should be tar." "It should be cpio." "Now it's pax." "What exactly are the options to the 'ps' command?" "Why did you think that you had a command named 'll'?" "No, the superuser's login shell is intentionally the same as it has been for 30 years." "Why does the user manual have a (sometimes little more than a placeholder) note telling me to read something else for the user manual?" "We're settling on info documentation." "No, we're not." "Hey people, I've had a bright idea of documenting everything in HTML and I'm calling it http://cr.yp.to/slashdoc.html http://cr.yp.to/slashdoc.html ." "The compatibility mechanism is of course to put /usr/xpg4/bin in your PATH." "No, that's gmake." "No, that's gawk." "Ah, actually it's mawk." "No, I think it's nawk." "I'm the real ksh!" "I am the real ksh!" "That's because it's the -I option, not the -i option." "We've actually had a non-interactively-usable general-purpose in-place text editor since Bill Joy wrote ex." "But ed is the Unix standard." discussions ... ... then you have not read enough of Usenet, WWW discussion fora, mailing lists, and others. (-:
- falcolas 10y agoThe comparison is a bit different: the difference for 'sed' is between the BSD version and the GNU version. Two tools based off the same original UNIX version of 'sed' whose development paths have diverged over the years. Also, the version of sed on OSX is around 11 years old, which helps contribute to its differences.
- lmm 10y agoScripts tend to allow you to override it, so you can do "export SED=gsed" or similar if you need to. (Good) script authors try to stick to the POSIX-standard subset of options (and ideally test on multiple systems). Sadly there's no test suite for "will this script work on any POSIX-compliant system" AFAIK.