You can use pairs of addresses which involve searches. For example,
to print all lines from the first line until the next line containing
In this directory is a file "list". Print all lines from
the first line to a line containing "023". Then leave the editor