ah, fogot my friend sed, I was just fighting with ', " and \ just now.<br><br>Thanks guys!<br><br>John<br><br><br><br><div><span class="gmail_quote">On 6/20/07, <b class="gmail_sendername">Alex van den Bogaerdt</b>
<<a href="mailto:alex@ergens.op.het.net">alex@ergens.op.het.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Wed, Jun 20, 2007 at 10:18:41AM -0500, John Conner wrote:
<br>> hey guys, I am trying to add last update time info into rrdtool graphic,<br>> what I did is something like<br>><br>> #!/bin/bash<br>> now=`date`<br>><br>> rrdtool graph blablabla \<br>> blablabla \
<br>> blablabla \<br>> COMMENT:"last update\: $now"<br>><br>> when I ran the scipt, I got the following error,<br>><br>> ERROR: Garbage ':56:46 CDT 2007' after command:<br>> COMMENT:last update\: Wed Jun 20 09:56:46 CDT 2007
<br>><br>> I know it was caused by the ":", rrdtool does not like any ":" without "\",<br>><br>> So any quick solution I can print date info on the graphic? thanks a lot!<br><br>Try sed, or awk, or any filter you happen to know. For instance:
<br><br>now=`date|sed 's/:/\\:/g'`<br><br><br><br>You could also tell date how to present its output:<br><br>now=`date -u +%Y-%m-%dT%H\\:%M\\:%SZ`<br><br>HTH<br>--<br>Alex van den Bogaerdt<br><a href="http://www.vandenbogaerdt.nl/rrdtool/">
http://www.vandenbogaerdt.nl/rrdtool/</a><br><br>_______________________________________________<br>rrd-users mailing list<br><a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><br><a href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users">
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a><br></blockquote></div><br>