[Cialug] shell script error

Chris Hettinger cjh at raccoon.com
Fri Aug 26 14:03:47 CDT 2005


#!/bin/sh

TODAY=date +%Y%m%d
MYSQLDUMP=/usr/bin/mysqldump
MYSQLUSER=mysqluser
MYSQLPASS=mysqlpass

${MYSQLDUMP} -u ${MYSQLUSER} --password=${MYSQLPASS} database1 > 
/home/chris/mysql_data/database1${TODAY}.sql

---------Where I run the above script it prompts:

[u at h chris]# sh mysql_data_backup.sh
mysql_data_backup.sh: line 5: +%Y%m%d: command not found

---------Help.

-ch




More information about the Cialug mailing list