How to store command arguments which contain double quotes in an array?
问题 I have a Bash script which generates, stores and modifies values in an array. These values are later used as arguments for a command. For a MCVE I thought of an arbitrary command bash -c 'echo 0="$0" ; echo 1="$1"' which explains my problem. I will call my command with two arguments -option1=withoutspace and -option2="with space" . So it would look like this > bash -c 'echo 0="$0" ; echo 1="$1"' -option1=withoutspace -option2="with space" if the call to the command would be typed directly