On Friday 26 May 2006 11:29, Nick Rout wrote: > given this string (all one line): > > Tracker Load: (9 %)<table class=main border=0 width=400><tr><td > style='padding: 0px; background-image: url(pic/loadbarbg.gif); > background-repeat: repeat-x'><img height=15 width=36 > src="/pic/loadbargreen.gif" alt='9%'></td></tr></table>18:25:15 up 2 days, > 23:44, 1 user, load average: 18.73, 20.96, 27.06<br></td></tr></table> > > what is the best way to parse out the first load average figure, ie in > this case 18.73
Yeah, what language? echo $THAT_LINE | sed -e 's/.*load average: //' | cut -d ',' -f 1 a bit dirty but it works. -- "I'd love to go out with you, but the man on television told me to stay tuned."