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

20030115: script errors



Chris,

You didn't show your crontab entry, but make sure it
is trying to execute the script, and not sourcing the
script.

Also, make sure that the first line of the script is "#!/bin/csh"
(no blank lines befor that.

Steve CHiswell


>From: "C.L. Hammond" <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200301151423.h0FEN6x23698

>Hi, 
>I am getting this error in my mail fron cron and I know it
>has to do with the shell that is running the script...I've
>read about it in the support archive, but the errors were
>happening when Gemenviron was being sourced from the
>command line from the wrong shell, and not from a cron
>job...here is the mail from cron:
>and below it is the script causing the error.
>any ideas
>thanks very much for any help you my provide!!
>chris hammond
>University of Georgia
>**********
>
>From wefx  Wed Jan 15 09:36:00 2003
>Date: Wed, 15 Jan 2003 09:36:00 GMT
>From: address@hidden (Cron Daemon)
>To: address@hidden
>Subject: Cron <wefx@wefx> source /home/wefx/scripts/nulast
>X-Cron-Env: <SHELL=/bin/sh>
>X-Cron-Env: <HOME=/home/wefx>
>X-Cron-Env: <PATH=/usr/bin:/bin>
>X-Cron-Env: <LOGNAME=wefx>
>
>/bin/sh: setenv: command not found
>/bin/sh: setenv: command not found
>/bin/sh: setenv: command not found
>/bin/sh: setenv: command not found
>/bin/sh: /home/gem/Gemenviron: line 19: syntax error near
>unexpected token `($TMP_OS)'
>/bin/sh: /home/gem/Gemenviron: line 19: `   switch
>($TMP_OS)'
>/bin/sh: /home/wefx/scripts/nulast: line 8: syntax error
>near unexpected token `($'
>/bin/sh: /home/wefx/scripts/nulast: line 8: `foreach AREA
>($DATA)'
>
>**********************
>the script is below
>**********************
>
>
>#!/bin/csh
>setenv DISPLAY unix:0
>source /home/gem/Gemenviron
>cd /home/ldm/data/gempak/nexrad/USRAD/usrad15/8km/NOW/
>set CURRENT_RAD=`ls NOW_* | tail -2`
>cd /home/wefx/radar/
>set DATA=(usnps)
>foreach AREA ($DATA)
>foreach FILE ($CURRENT_RAD)
>
>gpmap << EOF
>MAP      = 0
>TITLE    =
>DEVICE   = gif|wefx.gif|410;280
>RADFIL   =
>/home/ldm/data/gempak/nexrad/USRAD/usrad15/8km/NOW/$FILE
>PROJ     = rad
>GAREA    = ${AREA}
>CLEAR    = y
>PANEL    = 0
>TEXT     = 1
>LUTFIL   = /home/gem/gempak/tables/luts/my.tbl
>LATLON   = 0
>IMBAR    = 1/V/UL
>
>\$mapfil = hipowo.gsf
>r
>
>
>e
>EOF
>gpend
>end
>end
>
>rm -f wefx_1.gif
>mv -f wefx_2.gif wefx_1.gif
>mv -f wefx_3.gif wefx_2.gif
>mv -f wefx_4.gif wefx_3.gif
>mv -f wefx_5.gif wefx_4.gif
>mv -f wefx_6.gif wefx_5.gif
>mv -f wefx_7.gif wefx_6.gif
>mv -f wefx_8.gif wefx_7.gif
>mv -f wefx_9.gif wefx_8.gif
>mv -f wefx_10.gif wefx_9.gif
>mv -f wefx_11.gif wefx_10.gif
>mv -f wefx_12.gif wefx_11.gif
>giftrans -T wefx.gif > wefx_12.gif
>rm -f wefx.gif
>scp -B wefx*gif 192.168.1.103:~/radar
> 
>
>
>
>
>__________________________________________________
>Do you Yahoo!?
>Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
>http://mailplus.yahoo.com
>