initial state is "0"; while there's a line that you've read from the file { set state to "1" if the current line contains "HW/OS/Client" print the current line if the current state is "1" (true) set state to "0" if the current line is blank (contains only white-space) }