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

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -