script doesn't seem to work, not sure why though, any idea?
#!/bin/bash
#A backup script if the default data file has not been sent over
#
EXTEN=.txt
VALID=VSL0120
DATE1=$(date +%y%m%d)
DATE2=000000
DATE3='TZ=GMT-168 $date +%y%m%d'
DIR=/apps/live/aahvanroutedata
#
if [ ! $DIR/VSL01_D* ]
#
then
touch /export/home/tjmoore/default_data_backup_email < "We have not rece
ived todays default data file from Alliance, the default data file has b
een used from the previous weeks same day"
#
cp $DIR/$VALID$DATE3$DATE2$EXTEN $DIR/$VALID$DATE1$DATE2$EXTEN 2&1 >>
/export/home/tjmoore/default_data_backup_email
#
/usr/local/bds/mailsend.s mailx "Backup Default Data File has been used"
<email address> j<email address> /export/home/tjmoore/de
fault_data_backup_email > 2&1>/dev/null
#
fi
no errors are popping up, appreciate theres not a lot to work off, the file I try to create in the first section isnt being created either, just thinking does the test I do at the start mean if that file does not exist then carry on with the rest of the script?
Thankyou, getting somehwere now, just the DATE3 variable which isn't working correctly, I have the below now from what I understood from your reply. I need the date to be written into where the variable lies in the script e.g. 120910
#!/bin/bash
#A backup script if the default data file has not been sent over
#
EXTEN=.txt
VALID=VSL0120
DATE1=$(date +%y%m%d)
DATE2=000000
DATE3='TZ=TZ+168 $date +%y%m%d'
DIR=/apps/live/aahvanroutedata
#
if [ ! -e $DIR/VSL01_D* ]
#
then
touch /export/home/tjmoore/default_data_backup_email < cat "We have not
received todays default data file from Alliance, the default data file h
as been used from the previous weeks same day"
#
cp $DIR/$VALID$DATE3$DATE2$EXTEN $DIR/$VALID$DATE1$DATE2$EXTEN 1 >>
/export/home/tjmoore/default_data_backup_email
#
/usr/local/bds/mailsend.s mailx "Backup Default Data File has been used"
<email address> <email address> /export/home/tjmoore/de
fault_data_backup_email > 2&1>/dev/null
#
fi