On Sun, Apr 11, 2010 at 7:10 PM, markus schnalke <meillo_AT_marmaro.de> wrote:
> 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.
What is your question?
Type whatever it is more convenient to you and whatever prints as many
lines as you like.
11 is marginally easier to type than 10, but that is a matter of taste.
uriel
>
> meillo
>
>
Received on Mon Apr 12 2010 - 11:24:18 UTC
This archive was generated by hypermail 2.2.0 : Mon Apr 12 2010 - 11:36:02 UTC