On 15 April 2011 09:34, Bob Goodwin <bobgood...@wildblue.net> wrote: > > I am not familiar with sed and the commands are overwhelming [to > me]. Man sed hasn't helped ... I am interested. > > Perhaps you can tell me what's wrong?
Wrong tool for the job... sed is not something geared to processing XML. sam@server:~$ cat foo.xml | ./foo-process Actual Usage Upload : 1094 Usage Threshold Upload : 5000 Actual Usage Download : 12012 Usage Threshold Download : 17000 sam@server:~$ cat foo-process #!/usr/bin/python from xml.dom.minidom import parse, parseString import sys foo = parse(sys.stdin) for item in foo.getElementsByTagName("set"): print '%-30.30s: %s' % (item.getAttribute('name'),item.getAttribute('value')) -- Sam -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines