[colug-432] Portable Visible Tabs in Shell Scripts

Rob Funk rfunk at funknet.net
Wed Aug 10 10:03:54 EDT 2011


On Tuesday, August 09, 2011 09:24:50 PM Scott Merrill wrote:
> Jim, for the benefit of the class, can you elaborate on the overall
> benefit of being sh-compatible? What, specifically, are your reasons
> for wanting to avoid bash-isms?

One more that hasn't been mentioned specifically: busybox.
It's nice to be able to use your shell scripts when you log in to your router 
or phone.  :-)

In the case of both busybox and dash, it comes down to small environments 
where bash is considered unnecessarily big.

One the other hand, take a look at shell scripts that have been written with 
extreme portability in mind (e.g. a GNU configure script). There's a lot of 
extra code that checks for things like which variant of "echo" you have.
echo -e '\011' may do the desired thing in some environments, but not others.


More information about the colug-432 mailing list