Re: cron problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> So, now I read oracle's email....
> Right: 
> cron env is /bin/sh; and my backup script has #!/bin/bash as the first line, of course, so that's the shell environment. 
> 
> /bin/sh: -c: line 1: syntax error near unexpected token `&'
> /bin/sh: -c: line 1: `/home/oracle/dbbackup.sh >> /opt/oracle/backup/backup.log 2>>&1'
> 
> So it's a syntax error in the crontab entry... but *why*? 
> Ok, just went into Bourne, and it doesn't like 2>>&1. So, a simple question: won't it toast backup.log if I don't do that as an append - that is, if I do 2>&1, instead of 2>>&1?

I think it should be alright with 2>&1.  You're using >> to append to
the backup.log previous to that and 2>&1 will just made stderr go to
stdout... 

Give it a try and see.

Ray

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux