We don't need head(1) because we have sed(1). But do we get the first
ten lines with
        sed 10q
or with
        sed 11q
?

I am a bit confused, currently.

All sed implementation I had access to printed 10 lines with 10q. It
were from:
- GNU
- Heirloom (sv3, s42, posix, posix2001)
- SunOS (/usr/bin/sed, /usr/ucb/sed, /usr/xpg4/bin/sed)
- 9base

The man page of 9base's sed even says: ``sed 10q file -- Print the
first 10 lines of the file.''

The Unix Programming Environment also writes: ``So it's easy to write
a sed program that will print the first three (say) lines of its
input, then quit: sed 3q.'' (page 110)


Now I actually must assume, Uriel might be wrong. *eek*

See http://harmful.cat-v.org/software/

But is this possible? Or does it Plan9 different and 9base didn't keep
the semantics? Can someone please check Plan9's sed.


meillo

Reply via email to