Mailing List Archive


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

Re: [tlug] Bashing away at Unix



On 3/18/08, Dave Brown <dagbrown@example.com> wrote:

> I actually fatfingered it.  It should be:
>
>     ${1+"$@"}
>
>  Which is an overparanoidism for "$@".  Some ancient Bourne shells, upon
>  being presented with "$@" and no actual arguments, will expand that as
>  "" and not, as you might hope, an empty list.
>
>  So ${1+"$@"} tests to see if $1 is non-null, and if so, expands "$@".

Ah, I learned something new.  I owe you a beer the next time we're
adjacent in meatspace.

-sb


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links