bug in /bin/sh
Christian Bertin
chris at cetia4.UUCP
Thu May 25 01:23:10 AEST 1989
First, I apologized if this is an ancient bug. There is a problem in the
argument passing when shell functions are used: The expansion of $* turns
quoted strings into multiple arguments. The expansion of $1, for example,
works fine:
If I type:
$ print() echo $1
$ print a b
I get
a
Which is OK. If I type:
$ print "a b" c
I get
a b
Which is also OK.
But, if I type:
$ mail() /usr/bin/mailx $*
$ mail -s "a b c d e f" chris
the quoted string has become multiple arguments to 'mailx', so if I type
~h
I get
To: b c d e f chris
Subject: a
Cc:
Bcc:
When I should have
To: chris
Subject: a b c d e f
Cc:
Bcc:
If 'mailx' is used directly, everything is OK. Single quotes don't work any
better, in case you were tempted to try. If there is a fix for this, I would
appreciate if someone could mail it to me.
Thanks in advance.
Chris
--
Chris Bertin | -- CETIA -- 150, Av Marcelin Berthelot, Z.I. Toulon-Est
+33(94)212005 | 83088 Toulon Cedex, France
| inria!cetia!chris
More information about the Comp.bugs.sys5
mailing list