Hello,
I would like to print the line -1 and the currentline in awk (by looking the * in a report) but I dont'know how to do:
I tried:
By this way, I have the current line and the next one.
I tried with ex too:
But by this way, I dont have the currentline.
Does anyone have an idea ?
I would like to print the line -1 and the currentline in awk (by looking the * in a report) but I dont'know how to do:
I tried:
Code:
awk "/\*/{for(i=0;i<=1;i++){print;getline}}"
I tried with ex too:
Code:
>File_out
ex File<<!
>g/\*/.-1,.+1w>>File_out
>q
>!
Does anyone have an idea ?