September 2009
Beginner
942 pages
85h 34m
English
q
[address]q [address]q [value]{G}
Quit when address is encountered. The addressed line is first written to the output (if default output is not suppressed), along with any text appended to it by previous a or r commands. GNU sed allows you to provide value, which is used as the exit status.
Delete everything after the addressed line:
/Garbled text follows:/q
Print only the first 50 lines of a file:
50q