Problems with System V Release 2.1 on 68010
David DiGiacomo
david at sun.uucp
Thu Apr 17 04:15:14 AEST 1986
In article <412 at hropus.UUCP> ka at hropus.UUCP (Kenneth Almquist) writes:
>> 4) Is it true that the sh construct "$@" (in a shell script) is supposed
>> to be identically equal to the command-line arguments? It seems that
>> it should, because otherwise there is no way to get at these because
>> $@ = $* gets reparsed, and "$*" is one word.
>> In our sh, "$@" is exactly equivalent to the command line args if there
>> are some, otherwise it is equal to "" instead of nothing.
>> Seems like a bug to me. If so, how wide-spread is it?
>
>It's on our SVR2 on a VAX here. The Korn shell gets this right, of course.
This also afflicts SunOS 3.0. I find it incredibly annoying, but a simple
workaround is to use ${1+"$@"} instead of plain "$@".
[disclaimer]
--
David DiGiacomo {decvax, ihnp4, ucbvax}!sun!david david at sun.arpa
Sun Microsystems, Mt. View, CA (415) 960-7495
More information about the Comp.unix.wizards
mailing list