On 13/04/11 15:47, Dave Ihnat wrote: > On Wed, Apr 13, 2011 at 03:34:41PM -0400, Bob Goodwin wrote: >> I would like to write a script to extract two numbers from the following >> xml file: > There are *so* many ways to do this; one brute-force approach: > > Put the following two commands in a file; let's call it "foo": > > grep "Actual Usage Download" foo | sed -e "s/^.*value=\"//" -e "s/\" .*$//" > grep "Actual Usage Upload" foo | sed -e "s/^.*value=\"//" -e "s/\" .*$//" > > Make the file executable: > > chmod a+rx foo > > Then, if your XML file is named bar.xml: > > foo<bar.xml > > (If the file isn't in your path, "./foo", etc.) > > Cheers, > -- > Dave Ihnat > dihnat@xxxxxxxxxx [bobg@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. Thanks much. Bob -- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines