Mailing List Archive


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

Re: [tlug] Bashing away at Unix



On Fri, Mar 14, 2008 at 08:09:58PM +0900, Josh wrote:
> On 14/03/2008, SL Baur <steve@example.com> wrote:
> 
> > Yes.  When zsh is invoked as sh, it turns off *all* zsh extensions and
> >  behaves as a conformant POSIX shell.
> 
> I don't believe in using bash-isms in my shell scripts, which is why I write:
> 
> #!/bin/sh
> 
> and not
> 
> #!/bin/bash

Unfortunately, despite the claims of the man page, it's still often not
POSIX compliant.  

There's dash, which comes closer. 


> I came around to this way of thinking after having to admin SunOS 2.5,
> Solaris 7, 8, and 9, RHEL3, Fedora Core Whatever, Gentoo, and even
> ancient SCO UNIXware boxen all at the same time. Write once, run
> anywhere was useful. :)

Yup.  Annoying to realize that $UID is a bashism, and having a senior
moment, and forgetting the id command.  

zsh is nice though.  However, I find that on Linux it sometimes behaves
strangely.  I prefer it on FreeBSD. 


-- 
Scott Robbins
PGP keyID EB3467D6
( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
gpg --keyserver pgp.mit.edu --recv-keys EB3467D6

Oz: Looks dead, smells dead, yet it's moving around. That's 
interesting. 



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links