Next: tail, Previous: wc -l, Up: Examples
This script is probably the simplest useful sed script. It displays the first 10 lines of input; the number of displayed lines is right before the q command.
q
#!/usr/bin/sed -f 10q