3

I have a curl command as follows which can contain a password. The password can contain special characters. !£$%^&#-~@ etc.

curl d "valuea=1234&password=1234@!&valuec=87979&submit=Set" -XPOST "http://$ipa/school.cgi" 

When this is run I get: bash: !: event not found

How do I escape the special characters in the URL string ?

Thanks

2
  • 4
    See stackoverflow.com/questions/6697753/… Commented Feb 2, 2018 at 10:13
  • Thanks that makes sense to use the single quotes. But how do I have use a variable in the URL ? eg: curl d 'valuea=1234&password=$password&valuec=87979&submit=Set' ? Commented Feb 2, 2018 at 12:13

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.