I am trying to automate some of my stuff and facing a issue, the problem boils down to escaping the value that is being passed as a argument to the script.
#!/bin/bash loadPatch -name $1
$1 is the first argument and can have value like 'p12.9.5-bug34'
Running it as
produces no result. I checked with
echo $? the output was successful, but the required operation didn't happen.
$1 with this actual value to test in the script and it worked as expected. There is no way for me to put a print statement in
loadPatch to verify what arguments it has received.
So, I envisage there is some escaping problem here and hence need to know, is there any function/utility which I could use to escape the argument before using?
Please let me know if you see any other error with this?