Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Sep 2017 10:26:55 +0200
From:      Erwan Legrand <freebsd@erwanlegrand.com>
To:        Matthias Apitz <guru@unixarea.de>, list@museum.rain.com,  FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Possible bug in tail(1)
Message-ID:  <CA%2B4G5KbcoNXKz%2BV5X9BgcBMLyQLWkWTbVFni4CraBzRXi9tJnw@mail.gmail.com>
In-Reply-To: <20170927202811.GA2799@c720-r314251>
References:  <20170927195828.GA77592@g5.umpquanet.com> <20170927202811.GA2799@c720-r314251>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 27, 2017 at 10:28 PM, Matthias Apitz <guru@unixarea.de> wrote:
> The essence of the issue seems to be if tail(1) is reading a file/stdin
> or a pipe:
>
> $ cat foor
>
> 3
> 2
> 1
> $ tail -r foor
> 1
> 2
> 3
>
> $ tail -r < foor
> 1
> 2
> 3
>
> $ cat foor | tail -r
> 1
> 2
>
> 3

This works for me with 11.0-RELEASE-p12:

[erwan@melkor  /tmp]% cat foor

3
2
1
[erwan@melkor  /tmp]% tail -r foor
1
2
3

[erwan@melkor  /tmp]% cat foor | tail -r
1
2
3

[erwan@melkor  /tmp]% type tail
tail is /usr/bin/tail


But then, I use zsh, not bash.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B4G5KbcoNXKz%2BV5X9BgcBMLyQLWkWTbVFni4CraBzRXi9tJnw>