Comment by pabs3
6 days ago
Related problems: command-line options that allow code execution[1], and commands that execute arbitrary code from the current directory.
1. https://web.archive.org/web/20201111203646if_/https://www.de...
6 days ago
Related problems: command-line options that allow code execution[1], and commands that execute arbitrary code from the current directory.
1. https://web.archive.org/web/20201111203646if_/https://www.de...
I don't understand the rsync example with '-e sh shell.c' as short-form options with space-separated values are expected to be two separate args and yet the glob expands it to a single arg. Right? Unless the tool does additional argument processing?
'-e sh shell.c' as a single argument is the same as '-e' and ' sh shell.c' as separate arguments (see <https://pubs.opengroup.org/onlinepubs/9799919799/functions/g...>). rsync executes ' sh shell.c' as a shell script and shells usually trim leading and trailing spaces when executing commands.