Arrays are useful to keep your parameters whole:
command=(su aUser -s /bin/bash -c 'echo A')
and invoke it exactly like this:
"${command[@]}"
More Related Contents:
- What does 2>&1 mean here?
- Input data to a shell script [closed]
- How to reload .bashrc settings without logging out and back in again?
- How do I iterate over a range of numbers defined by variables in Bash?
- Why would a correct shell script give a wrapped/truncated/corrupted error message? [duplicate]
- When do we need curly braces around shell variables?
- Bash command line and input limit
- Replace one substring for another string in shell script
- How to find the difference in days between two dates?
- How to assign the output of a Bash command to a variable? [duplicate]
- Running script upon login in mac OS X [closed]
- How to append output to the end of a text file
- Command substitution: backticks or dollar sign / paren enclosed? [duplicate]
- How to process each output line in a loop?
- Is there a TRY CATCH command in Bash
- Set a parent shell’s variable from a subshell
- Value too great for base (error token is “08”) [duplicate]
- What expands to all files in current directory recursively?
- find: missing argument to -exec
- What does it mean in shell when we put a command inside dollar sign and parentheses: $(command)
- Looping through all files in a directory [duplicate]
- Is mixing getopts with positional parameters possible?
- Connect to sqlplus in a shell script and run SQL scripts
- pipe stdout and stderr to two different processes in shell script?
- Why equal to operator does not work if it is not surrounded by space?
- In bash, is there an equivalent of die “error msg”
- How do I integrate MSYS2 shell into Visual studio code on Window?
- How to update one file in a zip archive
- Why doesn’t my terminal output unicode characters properly?
- How to read variables from file, with multiple variables per line?