I am trying to script a wget command to download a web page and all it\'s attachments and jpegs etc.
When I enter the script by hand, it works, but I need to run thi
Quotes inside of quoted strings or variables are ordinary characters, not quoting characters. There's no way to change that. Use an array instead:
A=(a b 'c d' 'e f')
cmd "${A[@]}"
calls cmd
with four arguments a
, b
, c d
, and e f
.
(You could achieve a similar effect with eval
, but that's a lot more error prone. In your case, using arrays is much more convenient.)
session="--header=Host: mywebsite.com:9090 --header=User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:20.0) Gecko/20100101 Firefox/20.0"
use this,