Reference: q
Author: Daniel Gilly & the Staff of O'Reilly & Associates
Date: 1998-08-06T22:00:16Z

#

| Chapter 10 The Sed Editor |

## q

    [address]q

Quit when `address` is encountered. The addressed line is first written to output (if default output is not suppressed), along with any text appended to it by previous a or r commands.

### Example

Delete everything after the addressed line:

>     /Garbled text follows:/q

Print only the first 50 lines of a file:

>     50q

Reference: P |  | Reference: r