Path: utzoo!attcan!uunet!mcvax!inria!gouldfr!cetia4!chris From: chris@cetia4.UUCP (Christian Bertin) Newsgroups: comp.bugs.sys5 Subject: bug in /bin/sh Keywords: functions, quotes Message-ID: <883@cetia4.UUCP> Date: 24 May 89 15:23:10 GMT Organization: Cetia, Toulon, France Lines: 60 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