ksh prompt

Geoff Clare gwc at root.co.uk
Thu Mar 7 23:13:43 AEST 1991


lvc at cbnews.att.com (lawrence.v.cipriani) writes:

>Why not use "${@:-''}" instead of ${*:-''} ?

Neither of these correctly preserve the argument list.  In fact "${@:-''}"
will pass two single quotes when there are no arguments, so it's even
worse than plain "$@" which just passes an empty string.

The only way (as far as I'm aware) to get it right in all cases is:

    ${1+"$@"}

-- 
Geoff Clare <gwc at root.co.uk>  (Dumb American mailers: ...!uunet!root.co.uk!gwc)
UniSoft Limited, London, England.   Tel: +44 71 729 3773   Fax: +44 71 729 3273



More information about the Comp.unix.shell mailing list