I am trying to form a parametric call to curl from a shell script
header_string="--header \"X-param1: 1\" --header \"X-param2: 2\""
url="http://example.com"
command="curl $header_string $url"
a=`${command}`
This does not work because it is interpreted like
curl --header '"X-param1:' '1"' --header '"X-param2:' '2"' http://example.com
How can I quote this correctly?