bug in /bin/sh
daniel.r.levy
danl at cbnewsc.ATT.COM
Fri May 26 09:20:46 AEST 1989
In article <1011 at cbnewsc.ATT.COM> I wrote:
< < $ mail() /usr/bin/mailx $*
< Use "$@" [sic, including the double quotes] instead of $*. $* re-formats the
< arguments into individual tokens.
Since you might want to invoke this without arguments at all, use ${1+"$@"}
which will expand to nothing if there are no arguments. Otherwise,
/usr/bin/mailx will see one null argument if there are no arguments
passed to the function, and won't do what you want it to.
--
Dan'l Levy UNIX(R) mail: att!ttbcad!levy, att!cbnewsc!danl
AT&T Bell Laboratories
5555 West Touhy Avenue Any opinions expressed in the message above are
Skokie, Illinois 60077 mine, and not necessarily AT&T's.
More information about the Comp.bugs.sys5
mailing list