I'm thinking to awk for lines with /Name:/ and then print $NF of it and the following 6 lines, but my awk skills are pretty lame, so I'm sure how to do it.
Hi... thanks for the suggestions... but they don't work. I'm working on Ubuntu rather than Solaris... wouldn't have thought it would make that much of a difference but it obviously does
steadyonabix: when I use that line, I get zero output
radoulov: when I use that line, I get mumbled junk, looks like the fields are overwriting each other
tip78: when I use that script, I just get loads of errors of type...
Use of uninitialized value $1 in concatenation (.) or string at ./test.pl line 7, <FH> line 1618.
Use of uninitialized value $1 in concatenation (.) or string at ./test.pl line 7, <FH> line 1619.
Use of uninitialized value $1 in concatenation (.) or string at ./test.pl line 7, <FH> line 1620.
Thanks for the suggestions though.. I'll keep looking at it.
Use of uninitialized value $1 in concatenation (.) or string at ./test.pl line 5, <> line 2622.
Use of uninitialized value $1 in concatenation (.) or string at ./test.pl line 5, <> line 2623.
st@project:~/Documents$ perl -version
This is perl, v5.10.0 built for i486-linux-gnu-thread-multi
Sorry... I should have made it clearer there maybe... its for all lines in the input file that its erroring on not just 2-3... I was just giving an example of the errors. I'm not quick enough on the ctrl-c to get it for lines 1-100 also.
You get an extra newline at the beginning (the one above network1) and the last newline is missing
(your last line is incomplete, there is no newline after the very last 0).