man su 说:
You can use the -- argument to separate su options from the arguments
supplied to the shell.
Run Code Online (Sandbox Code Playgroud)
man bash 说:
-- A -- signals the end of options and disables further option
processing. Any arguments after the -- are treated as filenames
and arguments. An argument of - is equivalent to --.
Run Code Online (Sandbox Code Playgroud)
那么,让我们看看:
[root ~] su - yuri -c 'echo "$*"' -- 1 2 3
2 3
[root ~] su - yuri -c 'echo "$*"' -- -- …Run Code Online (Sandbox Code Playgroud)