Hi again
When I run this command shell (test.sh):
#!/bin/sh
BACKUPLOG="my_backup-$(date '+%Y.%m.%d:%H:%M').log"
export BACKUPLOG
#
cat > $BACKUPLOG 2> <<-EOF
Backup started at: `date`
EOF
#
I get the following error.
bash test.sh : line 6: syntax error near unexpected token `<<-'
bash test.sh : `cat > BACKUPLOG 2> <<- EOF'
Can anyone tell me why the file is not being created and wht the error is occuring?
Thanks
When I run this command shell (test.sh):
#!/bin/sh
BACKUPLOG="my_backup-$(date '+%Y.%m.%d:%H:%M').log"
export BACKUPLOG
#
cat > $BACKUPLOG 2> <<-EOF
Backup started at: `date`
EOF
#
I get the following error.
bash test.sh : line 6: syntax error near unexpected token `<<-'
bash test.sh : `cat > BACKUPLOG 2> <<- EOF'
Can anyone tell me why the file is not being created and wht the error is occuring?
Thanks