Re: Medieval Shells

[prev] [thread] [next] [lurker] [Date index for 2006/12/19]

From: Jarkko Hietaniemi
Subject: Re: Medieval Shells
Date: 13:19 on 19 Dec 2006
>> # purge - really remove a file!
>>>
>>> for i
>>> do [ -f $i ] && > $i
>>> done
>>> exec rm ${1+"$@"}
>>     #!/bin/sh
>>     tee ${1+"$@"} < /dev/null
>>     exec rm ${1+"$@"}
> 
> Why-oh-why are vile constructs like ${1+"$@"} still being used?  This
> isn't 1985 any more.  In any modern shell that you're likely to come
> across[1], plain "$@" will work just fine.
> 
> -Dom, hating the "must work in 7th Edition" line of shell scripters.

You hate them until your code needs to work in medieval environments.

> [1] Don't get started on all that tcsh shite again...
> 

There's stuff above here

Generated at 03:01 on 20 Dec 2006 by mariachi 0.52