Hi,
"help set" says
-- Assign any remaining arguments to the positional parameters.
If there are no remaining arguments, the positional parameters
are unset.
But it seems that the above definition is not clear enough to explain
the following output. Can anybody provide a better definitive
explanation of "set --"? Should it be better to interpret the single
quote in $x when "set --" is called?
~/linux/test/bash/man/builtin/set/--$ x="'abc def'"
~/linux/test/bash/man/builtin/set/--$ set -- $x
~/linux/test/bash/man/builtin/set/--$ printf "%s\n" "$@"
'abc
def'
--
Regards,
Peng