Escape problem for a shell command
guorenxi opened this issue · 1 comments
guorenxi commented
The shell command:
latestVer=$(curl -s 'http://nginx.org/en/download.html' | sed 's/\'$'\n''</g' | sed -n '/Stableversion$/,$ p' | egrep -m1 -o '/download/nginx-.+\.tar\.gz')
was translated to:
latestVer=$(curl -s 'http://nginx.org/en/download.html' | sed 's/<!--\'$'\n''</g' | sed -n '/-->Stableversion$/,$ p' | egrep -m1 -o '/download/nginx-.+\.tar\.gz')
Any workaround?
Thanks.
AndiDittrich commented
don't forget to escape the html sequence <