On Wed, 5 Feb 2003 19:19:09 +0000 (GMT)
Sam Halliday <[EMAIL PROTECTED]> wrote:

> Georg Nikodym wrote:
> > Lastly:
> >     me=${0##*/}
> > can be rewritten portably:
> >     me=`basename $0`
> 
> hehe :-D
> 
> works for me on Solaris 8!

To be perfectly clear, my suggested replacement works, the original code
does not (on any version of Solaris < 8 [beyond which I can't comment]):

(myhostname) 502$ uname -a
SunOS toronto-fs 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-4
(myhostname) 503$ sh
(\h) \!$ foo=/bin/sh
(\h) \!$ echo ${foo##*/}
bad substitution
(\h) \!$ echo `basename $foo`
sh
(\h) \!$ 

-g

Attachment: msg00769/pgp00000.pgp
Description: PGP signature

Reply via email to