Reputation: 163
I need to print this password in script :
PASS="$database$"
echo "sqlcmd -U system -P $PASS -S dbtest ">> exec.bat
but when I execute the script, I have thi result:
echo "sqlcmd -U system -P **$** -S dbtest ">> exec.bat
Can you help me?
Upvotes: 0
Views: 94
Reputation: 74635
You need to use single quotes in the assignment:
PASS='$database$'
Currently, $database
is being interpreted as the value of a variable, because of the double quotes.
Upvotes: 1