2018-04-30 16:49:34 +0100, Geoff Clare:
[...]
> Yes, but it clearly shows that this offset is intended to be honoured
> by the next utility to read from stdin, when it says:
>
> tail -n +2 file
> (sed -n 1q; cat) < file
> [...]
> The second command is equivalent to the first only
Stephane Chazelas wrote, on 30 Apr 2018:
>
> 2018-04-30 15:50:10 +0100, Geoff Clare:
> > Stephane Chazelas
> > wrote, on 30
> > Apr 2018:
> > >
> > > The head/tail specifications refer to line/byte offsets
2018-04-30 15:50:10 +0100, Geoff Clare:
> Stephane Chazelas
> wrote, on 30 Apr 2018:
> >
> > The head/tail specifications refer to line/byte offsets as
> > offsets within *files* as opposed to *input*.
> >
> > Does it mean that:
> >
>
Stephane Chazelas wrote, on 30 Apr 2018:
>
> The head/tail specifications refer to line/byte offsets as
> offsets within *files* as opposed to *input*.
>
> Does it mean that:
>
> { head -n 1; head -n 1; } < file
> { tail -n 1; tail -n 1; } < file
>
> are required
Hello,
The head/tail specifications refer to line/byte offsets as
offsets within *files* as opposed to *input*.
Does it mean that:
{ head -n 1; head -n 1; } < file
{ tail -n 1; tail -n 1; } < file
are required to print the first/last line of "file" twice
(assuming "file" is seekable and is not