<div>just a guess but the instruction:</div> <div>gawk {print $1} ..</div> <div>should be changed to:</div> <div>gawk '{print $1}' ..<BR></div> <div><BR><B><I>Simon Hobson <linux@thehobsons.co.uk></I></B> a écrit :</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">zura baizura wrote:<BR><BR>>gawk: cmd. line:2: (END OF FILE)<BR>>gawk: cmd. line:2: parse error<BR>>ERROR: opening 'sss.rrd': No such file or directory<BR>>ERROR: opening 'sss.rrd': No such file or directory<BR>>-----------------------------------------------------<BR>>please... help me to fix the crontab error...<BR><BR><BR>It's a common problem, your script works fine when run manually but <BR>fails when run by crontab. Usually it's a difference in environment - <BR>either environment settings or path.<BR><BR>I normally use full paths for everything when writing scripts for cron, eg
:<BR><BR>#!/bin/sh<BR>MyHome="/home/baizura/"<BR>DATA=`tail -1 "${MyHome}percubaan/reading" | gawk {print $1} -`<BR>/bin/echo $DATA<BR>TIMESTAMP=`/bin/date +%s`<BR>/bin/echo $TIMESTAMP<BR>/usr/local/bin/rrdtool update "${MyHome}sss.rrd" $TIMESTAMP:$DATA<BR>/usr/local/bin/rrdtool fetch sss.rrd LAST --start 1173839600<BR><BR><BR>BTW - I think you may also have had an error in the DATA= line, but <BR>I'm not sure (haen't really got going yet today !).<BR><BR>_______________________________________________<BR>rrd-users mailing list<BR>rrd-users@lists.oetiker.ch<BR>https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users<BR></BLOCKQUOTE><BR><p> 
                <hr size="1">
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur <a href="http://fr.rd.yahoo.com/evt=42054/*http://fr.answers.yahoo.com">Yahoo! Questions/Réponses</a>.