Script to extract data -
Cameron Simpson
cs at zip.com.au
Thu Apr 14 23:09:11 UTC 2011
On 13Apr2011 16:11, Bob Goodwin <bobgoodwin at wildblue.net> wrote:
| On 13/04/11 15:47, Dave Ihnat wrote:
| > [ grep | sed approach ... ]
|
| [bobg at box9 ~]$ grep "Actual Usage Download" /home/bobg/foo | sed
| -e "s/^.*value=\"//" -e "s/\" .*$//"
| 12667
|
| Aha, that works. It's so much easier when you can find someone
| who knows how!
|
| I said I can muddle through from there, that was the hard part.
Never forget that sed can do what grep does, so (untested, one line):
sed -n '/Actual Usage Download/s/.*value="\([^"]*".*/\1/p' < /home/bobg/foo
Cheers,
--
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/
"Neomort" : Brain-dead human, kept alive for medical purposes.
"Medicine Lecturer" : Brain-dead human, kept alive for medical purposes.
More information about the users
mailing list