Computing.Net > Forums > Linux > scripting help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

scripting help

Reply to Message Icon

Name: deity_me
Date: August 10, 2004 at 14:35:59 Pacific
OS: Redhat 9
CPU/Ram: P2 400
Comment:

Hi I need help writing a script for something
I need to write a script to backup my MySQL database

basically my command is this

mysqldump -p -B WEB > file

this asks me for my password and then proceeds to write to file

what I want to do is script it so that it doesnt ask me for a password it takes the password automatically from the script and to change the name of the file to the current date.

Thanks

Money not an issue?
Where do you live and when are you not home?
I'm not gonna rob you, I'm just gonna steal some stuff



Sponsored Link
Ads by Google

Response Number 1
Name: Dlonra
Date: August 10, 2004 at 17:18:28 Pacific
Reply:

mysqldump -p -B WEB <<! >file.$(date "+%xxx")
mypassword
!

man date, see FORMAT options for "xxx" values



0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: scripting help

advanced shell script help www.computing.net/answers/linux/advanced-shell-script-help/17749.html

UNIX Script help www.computing.net/answers/linux/unix-script-help/7820.html

script help please www.computing.net/answers/linux/script-help-please/19281.html