[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Changing the default simlink to sh [was: Password file with over 3000 users.]

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 be
> different.
> 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 shell
that is really close to the real sh implementation WILL help in my
developments. I DO expect sh to react like sh, and not like bash. I got
traped by some bashism when writing scripts, and I really feel like
cheated by Debian on that case.

So I do expect Debian and *BSD to be different, but it would really help
if it was not. And that's why I think this change for sh is a good thing.

If it breaks 1 or 2 shell scripts there and there, then be it! Changing
to call the real bash is not as hard as you are saying!

> i regularly have to modify scripts written on one *nix-like system so
> that they will work on another. it's not in the least bit surprising. it
> is *expected*.

But being closer to the standards of other Unix helps to have LESS work
when porting. That's a very good thing.

> 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 is
different from the BSD one, and then making my md5 checksum wrong many
times. I wish it was really the same !!!


Reply to: