Thanks Annihilannic!
I've actually used both awk sections. Your solution for the first was made with correct assumptions - there is a random amount of lines before a macthing P.
But, I then wanted to manipulate that output and have used your second solution to do that.
Everything seems to...
Ok, thanks, I think I'm getting there. One last query...
I would now like to layout this data as below:
HEADER1, HEADER2, IMPORTANT, DATA
HEADER1, HEADER2, MORE, IMPORTANT, DATA
HEADER1, HEADER2, IMPORTANT, DATA
HEADER1, HEADER2, MORE, IMPORTANT, DATA
HEADER1, HEADER2, MORE, IMPORTANT, DATA...
Hi
Thanks for the replies so far. My version of grep doesn't seem to support -B so I guess I will need to use awk in some way.
The problem I have is that there is not a set number of lines beginnig with P,. So even if I have some kind of check to see if the line following R, begins with P, I...
Hi
I wonder if anyone can offer any help on this. I'm trying to manipulate some text from a file using a korn shell script.
I have the following data in a text file:
------------------------
C, HEADER1, BLAH, BLAH
R, HEADER2, BLAH, BLAH
C, HEADER1, BLAH, BLAH
R, HEADER2, BLAH, BLAH
C...
Hi, due to a flood a lot of my WYSE terminals have stopped working.
The only display on the screen now is:
1-1
-------------------------
FDX
I have tried hard booting them (holding G during a power off/on) but this has no effect.
Has anyone seen this before?
Cheers
DSPARC
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.