From owner-freebsd-questions@freebsd.org Wed Sep 27 21:32:10 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E18F5E0FD32 for ; Wed, 27 Sep 2017 21:32:10 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A43582DE8 for ; Wed, 27 Sep 2017 21:32:09 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from [2.247.255.221] (helo=localhost.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.86_2) (envelope-from ) id 1dxIwL-0007Ky-7N; Wed, 27 Sep 2017 22:28:17 +0200 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.unixarea.de (8.15.2/8.14.9) with ESMTPS id v8RKSDBd002860 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 27 Sep 2017 22:28:13 +0200 (CEST) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.15.2/8.14.9/Submit) id v8RKSBS1002859; Wed, 27 Sep 2017 22:28:11 +0200 (CEST) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Wed, 27 Sep 2017 22:28:11 +0200 From: Matthias Apitz To: list@museum.rain.com Cc: freebsd-questions@freebsd.org Subject: Re: Possible bug in tail(1) Message-ID: <20170927202811.GA2799@c720-r314251> Reply-To: Matthias Apitz Mail-Followup-To: Matthias Apitz , list@museum.rain.com, freebsd-questions@freebsd.org References: <20170927195828.GA77592@g5.umpquanet.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline In-Reply-To: <20170927195828.GA77592@g5.umpquanet.com> X-Operating-System: FreeBSD 12.0-CURRENT r314251 (amd64) X-message-flag: Mails containing HTML will not be read! Please send only plain text. User-Agent: Mutt/1.8.0 (2017-02-23) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 2.247.255.221 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Sep 2017 21:32:11 -0000 --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--