Here is the situation I am having now, I can't get the next to work. Perhaps I don't understand the context in which to use it. I have 3 commands in my script file:
one is: /title/ {print $1}
second is: /number/ {print $1 "makes" $3}
third is: BEGIN {print "\033[4mCol1 \tCol2\033[0m"}
{if ( x == "y" ) print $2, $3}
It will print it all out but no matter where I put the next, either after one, two or three, it still prints it out in the same way:
Col1 Col2
Dave makes 10.00
Johnson 30
Janeway 30
Bud
Mark
I don't want it to come out like that. I want it to come out like this:
Bud
Mark
Col1 Col2
Johnson 30
Janeway 30
Dave makes 10.00
It seems that the file it is reading from--Dave is at the top of the list; Then Johnson and Janeway; and finally Bud and Mark are toward the bottom of the list. So, it is processing it according to how the text file is listing these lines. Can that be changed?