0

In shell script I am hardcoding username and password to connect to db. If the password field has $ followed by numeric value it is considering as the argument or parameter hence not connecting to db.

Please suggest how this can be resolved.

I cannot change the db password

1 Answer 1

1

Quote your password with single quotes.

For details, see your friendly manual - open a terminal and type man sh or man bash (if bash is the shell you're using).

The online Bash reference manual also has pages on quoting. (I found these with Google, literally within a second.)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.