Here is what I have:
#!/bin/bash
# Setup year date and month
YR=`date +%Y '{print $6}'`
MON=`date +%b '{print $2}'`
DAY=`date +%d '{print $3}'`
file=$YR$MOY$DOM
# clear
# Dump database using USER/PASS to [filename].[date].sql
mysqldump --user=me -ppass database > database-db.$file.sql
The YR, MON and DAY dont work. Sounds like the data is not getting put into the variable .
What Am i doing wrong?
thanks for the help