How to escape strings in bash script -
i running bash script calls mysql. password ist not correctly transmitted, guess have escape special chars, hash or dollar sign?
#!/bin/bash user=myuser pass="#mypass$" # ... call mysql
using "..." correct thing do, $ needs escaped (\$) if isn't followed "invalid" character. need make sure have variable in quotation marks well, in:
somecommand -p "$pass"
Comments
Post a Comment