Reputation: 67
Whenever I try to run the bash script, its taking my password as a command. I am receiving "command not found" at the password portion. If use -p in the script, it accepts it in the prompt, but not when the password is in the script.
How would I go about "escaping" the password so its taken as plain text and not a command?
I tried password="thepassword" and $password, etc, no avail
#!/bin/bash
date=`date +%A`
mysqldump --opt -Q -u somedb -somecrazypassword usersomedb > /backup/backup-$date.sql
Upvotes: 0
Views: 387