Created
July 16, 2023 11:54
-
-
Save rafaelmaeuer/2ca3613338f39e28442fed8e047874bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wrappedProgram "$@" | |
# ^^^ this is correct and will hand over all arguments in the way | |
# we received them, i. e. as several arguments, each of them | |
# containing all the spaces and other uglinesses they have. | |
wrappedProgram "$*" | |
# ^^^ this will hand over exactly one argument, containing all | |
# original arguments, separated by single spaces. | |
wrappedProgram $* | |
# ^^^ this will join all arguments by single spaces as well and | |
# will then split the string as the shell does on the command | |
# line, thus it will split an argument containing spaces into | |
# several arguments. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment