On Thu, Oct 19, 2006 at 09:28:23PM +0700, sonjaya wrote: > i have script for update automaticly here: > # cat /root/update_part1.sh > #!/bin/csh > cd /usr/src > setenv CVS_CLIENT_PORT -1 > setenv CVSROOT [EMAIL PROTECTED]:/cvs > cvs -d $CVSROOT -q up -rOPENBSD_3_9 -Pd > date > /root/update_part1.log > > when i try run that script get error such like this : > # sh /root/update_part1.sh > /root/update_part1.sh[3]: setenv: not found > /root/update_part1.sh[4]: setenv: not found > cvs update: CVSROOT "-q" must be an absolute pathname > cvs [update aborted]: Bad CVSROOT.
sh(1) isn't csh(1) -- if you run `sh your_csh_script.sh`, sh ignores the interpreter line and tries to run the script itself. sh doesn't use setenv, which is why you get 'setenv: not found.' If I were you, I'd write the script in sh. csh has long been considered harmful, and isn't very much fun to write. -- o--------------------------{ Will Maier }--------------------------o | web:.......http://www.lfod.us/ | [EMAIL PROTECTED] | *------------------[ BSD Unix: Live Free or Die ]------------------*