[Gllug] parsing command output
salsaman
salsaman at xs4all.nl
Wed Feb 14 17:31:09 UTC 2007
Hi all,
I need a little bash script that should do the following -
run a program and parse the output on stderr. It needs to write the
fourth field of the 7th and 8th lines to a file. Fields are separated by
one or more spaces and lines can also start with a space.
E.g. if the output of command "foo" on stderr is:
1abc
2def
3abc
4def
5abc
6 mmmm
7abc 123 56 1024 xxx
8abc 123 56 768 yyy
9 aaa
then the result in out.txt should be:
1024
768
Thanks in advance,
Gabriel.
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list