> > Also, that should probably be "$@", just in case. > > I don't think it'll make any difference; if, say, "foo" "bar" "baz" is > passed, both $@ and "$@" will expand to "foo" "bar" "baz" (yes, bypassing > the quotes). > > According to POSIX.1-2017's specification of `sh`: > > When the expansion occurs within double-quotes, the behavior is unspecified > unless one of the following is true: > > + Field splitting [...] would be performed if the expansion were not within > double-quotes [...]. > > + [...] > > So, $@ == "$@". It does actually make a difference if the arguments have spaces. Given arguments "foo" and "foo bar", $@ expands to "foo" "foo" "bar" and "$@" expands to "foo" "foo bar". - Saku Laesvuori