On Sep 26, 2007, at 5:08 AM, Thomas Goirand wrote:
Craig Sanders wrote:Don't you think it would be surprising to both parties if I write a/bin/sh script (using bashism which go unnoticed on my Debian system)and then give to someone running BSD, where it does not work?no, i don't.a person expects debian and *bsd (and solaris and aix and ......) to bedifferent. they DON'T expect one debian system to be that different to another, depending on when it was built or when it was last upgraded.I don't know for others, but I try to write scripts that would work for many different types of Unix. The SAME script. To me, having a sh shellthat is really close to the real sh implementation WILL help in mydevelopments. I DO expect sh to react like sh, and not like bash. I gottraped by some bashism when writing scripts, and I really feel like cheated by Debian on that case.
Why can't you put your chosen sh shell in your shebang, just like you're asking others to be forced to do?
Elitism is the only logical answer. Your needs are greater than theirs.
If it breaks 1 or 2 shell scripts there and there, then be it! Changingto call the real bash is not as hard as you are saying!
And you changing YOUR scripts is easier for a whole lot of people.
But being closer to the standards of other Unix helps to have LESS workwhen porting. That's a very good thing.
Anyone porting can call the correct shell.
and it's not just bashisms, almost all of the standard utilities (incl.awk, sed, grep, cat, tail, find, du, df, nice, ps, time, and hundreds more) are different from system to system.This really pissed me off. Especially the implementation of tar that isdifferent from the BSD one, and then making my md5 checksum wrong many times. I wish it was really the same !!!
Good luck with that. Unix has been fragmented since AT&T System V days. Deal with it.
That's your recommendation to everyone else for the changes you propose, why not just follow your own advice and leave everyone else alone?
-- Nate Duehr nate@natetech.com