How to skip the evaluation of ampersand in command line?
When inputting a Google Maps Directions URL into the command line (for opening with Chromium browser via the terminal) there is an ampersand (&
) in the URL, however the terminal breaks it there because of Unix stuff being Unix stuff. Is there something I can type into the terminal that when the command actually goes through, that will be treated like an ampersand?
Will ;amp; work?
Solution 1:
You need to put the address in quotes:
chromium-browser 'http://whatever.com/?x=1&y=2'
Solution 2:
Quotes will fix this but you can also escape things with a back-slash:
echo http://whatever.com/?x=1\&y=2
Not saying this is better, by any means, it's just another option for situations like this.