Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Sep 2017 22:28:11 +0200
From:      Matthias Apitz <guru@unixarea.de>
To:        list@museum.rain.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Possible bug in tail(1)
Message-ID:  <20170927202811.GA2799@c720-r314251>
In-Reply-To: <20170927195828.GA77592@g5.umpquanet.com>
References:  <20170927195828.GA77592@g5.umpquanet.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--HlL+5n6rz5pIUxbD
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

El d=C3=ADa mi=C3=A9rcoles, septiembre 27, 2017 a las 12:58:28p. m. -0700, =
list@museum.rain.com escribi=C3=B3:

> Is it reasonable to expect that tail -r is reversable?  That is, should:
>=20
> tail -r foo | tail -r
>=20
> produce the same output as:
>=20
> cat foo
>=20
> for all text files foo?
>=20
> The script below creates a file foo for which the above does not
> hold.

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



--=20
Matthias Apitz, =E2=9C=89 guru@unixarea.de, =E2=8C=82 http://www.unixarea.d=
e/  =E2=98=8E +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
8. Mai 1945: Wer nicht feiert hat den Krieg verloren.
8 de mayo de 1945: Quien no festeja perdi=C3=B3 la Guerra.
May 8, 1945: Who does not celebrate lost the War.

--HlL+5n6rz5pIUxbD
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEXmn7rBYYViyzy/vBR8z35Hb+nREFAlnMCdgACgkQR8z35Hb+
nRFiVQ//UbnswQfhIonTZIsXYGeO6uzbMNKseJ3VKThE3dm20QZqYCQFUQSrqCM7
92qi0JQESeXvezOltvlpg7kX4on980lqKd/BT9BzaRyxAs8DPkD/n/fVKUBFgMNH
ULzHSfmr+faSyEljrJ9AZFhsgaQgPb7y7upnYd/C9Wt/twy1EfaJTriZIStSrmnv
q1wxX8ciR6+feBDGDhq6LQ83XZkEVhBES8STCtgSvDzArJra+20d1oOGtg1ChRfS
WVi/aEVMUBelPkrYdpLRAgqVViOJ9P+gM+rwzHn6LDpBf9WIRWsmYAtUjVYnkONa
2K3IX0BNL3dysQyJ2cReTVDq2jra3J/dsyF+mCIIyvhStgkU7jPtAgos1iGAH7tb
/tEujk1yeIiwIcTKUE1W+4o81q8iuxQsXOC3yMlUoZJw51rd2ZXRkgI43CXVRHK2
Ga8QJ2th2fcnSa8ibq3gzo5iYj8GyS/amKx8p+fhWtQGzfNi9mVMeI6ujhMJNp9K
l1nY7ILkAlVeGV/bw3tpqhehPYIjPzA/878nFR/gae8tTeewXGwMZalyxnWgJ5b8
4MrOnzxxZ8jJGECaunvM2VwZXZrDFPM/b+vqnxPIWvNoCl+4PC5+gtMDgmsTqyp4
MrUeY0OSmxXpjJrJEXqAqlzppElof2ocMhHQfszqF2yA3KHwUKM=
=za8D
-----END PGP SIGNATURE-----

--HlL+5n6rz5pIUxbD--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170927202811.GA2799>