Bruce Park <bpark79@hotmail.com> [2002-11-09 21:26:51 -0500]:
>
> I plan to install bash and tcsh. I'm currently running bash under
> redhat(I'm waiting to for a new release for debian) and I use it all the
> time. The only reason why I want the original UNIX shells is to test some
> scripts that I'm writing.
Ah! I think the light comes on for most of the readers of the list.
Portability testing. And you want to test to make sure it works under
the old and venerable Bourne shell. Which is wonderful. But also a
problem. You might as well give up in dispair right now.
The old Bourne shell is not free software. Therefore only commercial
proprietary systems have it available. You won't find it in a Debian
system for this reason. In fact I know not of any free software based
system that has the Real Thing available. Since only rewritten clones
are available anyone that has taken the time to rewrite the old Bourne
/bin/sh will have taken the time to make it a modern standard
conforming /bin/sh. (However, perhaps someone can prove me wrong.)
In order to find a Real Thing copy of the Bourne shell you would need
to run on a commercial proprietary system which still has the legacy
executables on the system. And it would probably need to be an old
system at that. Most commercial systems have dropped the Bourne shell
and converted to the POSIX /bin/sh shell in order to confirm to the
modern standards. If the system claims POSIX conformance then you
have a POSIX /bin/sh and not the Bourne flavor. Although some systems
ship something like /usr/old/bin/sh or similar things in a "break
glass in case of emergency" type of situation. They are not really
expected to be used.
A better plan IMNHO is to target a modern standard /bin/sh. That will
run on probably every system you care about. If you have a particular
system which is old then include it specifically in your target group
and test there. Also, more portability problems will come from things
outside of the shell syntax than from within it. The real problems
are assumptions about which md5sum the system uses or whether egrep is
in /bin or /usr/bin and other such things that differ between systems.
Stick with the standard middle of the road syntax, make as few
assumptions as possible, test during development on at least three
widely different systems and you should be as good at portability as
anyone can possibly expect.
Bob