Hacker News new | ask | show | jobs
by Maken 424 days ago
That's usually caused by assuming that everything is bash, which is not true even for Linux.
2 comments

While that may certainly arise if someone is lazy about #!/bin/sh when they didn't really mean /bin/sh I'd bet it's /bin/sed and similar friends that are different between the GNU versions and the BSD versions. So much make-macro-trickery out there when one is trying to use -i without a backup suffix, and I have no idea why GNU tried to be a trailblazer with their parsing :(
Yes - I come from an era when I used multiple Unixes and for several of them default shell was (t)csh.

Don't assume anything in shells except POSIX sh.

Unfortunately there are people who think Linux is the only way.