I am trying to download a file which has symbol "(" in it;s URL. I tried using wget and curl. Bash is not allowing it to be processed and throws "-bash: syntax error near unexpected token `('".
Any idea how to resolve it?
You should escape the character by adding a "\" before it. Like \(
or \)
Add single quotes '
or double quotes "
around the URL.
I hope someone found this useful.
In my case, I want to curl this file name data (1).rar
then it should be write like this in the terminal
http://example.com/data%20\(1\).rar
I encountered the same problem and solved that issue just by adding double quotes to the command what I am passing. for eg:
git checkout "<branch_name>"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With