Hi,
I just started using linux, and I am trying to use awk to search for a string in a document. If it exists I would like to print the next 33 lines(there will be mulitple matches in these files). Ive tried variations of this form, but dont know how to print by line.
Opps, I forgot to mention the first field for this line needs to say "start" as well can this be added in to that search pattern?
Let me try and clarify...
I am looking for these two things in the line and if they match I need all the lines after that until the next "start" This is much harder than I first thought.
start xxx xxx 1970
This might be a dumb question but I dont think I have the nawk command. Can this be run using just awk.
I am new to our system and it says nawk command not found
This is the format of the file. The output can be the same. I just need to extract the entire line with "start", and a value in the fourth column, and all of the following info until the next "start" for the entire file. Im sorry this might be confusing, I am very new to this.
Ok Ive tried to add some BB Codes, they are all new to me, I thought the bold strings could be used for searching in awk. I need the output to be identical to the input. I just only want data from 1970. There are an unknown number of lines after the line with start & 1970 I want them all if they are from 1970. Let me know if this helps clarify