GNU bug report logs - #39951
tail -n +NUM is not working properly

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Reported by: Dimitris Moraitidis <dimitris.moraitidis@HIDDEN>; dated Fri, 6 Mar 2020 15:30:02 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Mar 2020 15:29:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 06 10:29:51 2020
Received: from localhost ([127.0.0.1]:45712 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jAEv8-0005p9-I8
	for submit <at> debbugs.gnu.org; Fri, 06 Mar 2020 10:29:50 -0500
Received: from lists.gnu.org ([209.51.188.17]:37730)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dimitris.moraitidis@HIDDEN>) id 1jA9V1-00061E-Om
 for submit <at> debbugs.gnu.org; Fri, 06 Mar 2020 04:42:32 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:55564)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <dimitris.moraitidis@HIDDEN>) id 1jA9V0-0006r8-Im
 for bug-coreutils@HIDDEN; Fri, 06 Mar 2020 04:42:31 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 HTML_MESSAGE autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dimitris.moraitidis@HIDDEN>) id 1jA9Uz-0004bh-9R
 for bug-coreutils@HIDDEN; Fri, 06 Mar 2020 04:42:30 -0500
Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:34451)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <dimitris.moraitidis@HIDDEN>)
 id 1jA9Uz-0004Yj-0E
 for bug-coreutils@HIDDEN; Fri, 06 Mar 2020 04:42:29 -0500
Received: by mail-wr1-x42b.google.com with SMTP id z15so1548477wrl.1
 for <bug-coreutils@HIDDEN>; Fri, 06 Mar 2020 01:42:28 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=wuQZtR3iYDGi7DN99bsGrtl2CiYr7vC2g5Cobl993qo=;
 b=Y4i2q9uZhkRcQDyTSqNrsj8HKkowgMwpQIyt+4s5iPyQsos9dxLuWjMykedBvx+puf
 Z+L5oRgIaMFO61acig1feQLc3dL1pfkCj5ZQMz36jqFrGnanWLsUTu83bsl7vbzkIxHF
 I5bx79cVBHtCebWwnQ/8Nt7blUdQ2/e4phqjTIaQVQS7GL94fFc6XJhr7WPWTITIocDT
 OhjLCHr0nmeseXwANvX7HyUduyXCJMQ2CuNx+hGaopUAi7Aq/k6/CWDQYrJvR9UNIgjR
 BeSIB5kGo+5mK1JzY3Wi5hamD4IgI2oOY0d5okRjk37G2WePMD7UNxmpq1K58WlMvQeK
 6DZw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=wuQZtR3iYDGi7DN99bsGrtl2CiYr7vC2g5Cobl993qo=;
 b=Arzsdlt+IqqL5Vk0Zrw7fCivZKgcfEJTzCxB7nk/qcXTbixLBGJEbzyKKgQd9WNhHQ
 oW4Fv4WHkFeblYCc29XigMfNcj0R5GzTk9MMVUoDgtpe1wwpkR7S3nRUgylDD98mnZFu
 o1XJcISs0HcTX15e96iIov7pSpEIpSIM8hPdQuG3pLqTwchd4elvJCEK+CDv9kUmTfKD
 AYrJzJq2EkitSX6CIipPavn3+Dkym5TbFA4Cx3Vp+4uInzPTtl9TsksI0sV4/I3LI1w9
 1d23X3NRlwHLclNIPKe7paOqvOXLxuNtIJKo1mh5wq1DG+RAZEeITYUymucb2ofJp4Ky
 gWjg==
X-Gm-Message-State: ANhLgQ3usZKiQdyLZGAMZamiTiYoN7gTZb99bwymc/Wg+MbgpkHTFg1k
 LDQe6BHeRKpW0i1ANh99H0icRJxEu7te31aV0tyNBRql
X-Google-Smtp-Source: ADFU+vszCkj5k80Bm7dE9BMBbrkLNvXG7/cHLuCxMOGXzqHOmSaynwmoe4YB3Ri4VyTNCQ0aGz0P/SQUf+XP0LKcN3Q=
X-Received: by 2002:adf:a411:: with SMTP id d17mr3130669wra.126.1583487746928; 
 Fri, 06 Mar 2020 01:42:26 -0800 (PST)
MIME-Version: 1.0
From: Dimitris Moraitidis <dimitris.moraitidis@HIDDEN>
Date: Fri, 6 Mar 2020 10:42:15 +0100
Message-ID: <CAMOJ5BJEU9QntWDf4NprQSOMSStM+Cw3x_o9ktekAkjkq1xG4A@HIDDEN>
Subject: tail -n +NUM is not working properly
To: bug-coreutils@HIDDEN
Content-Type: multipart/alternative; boundary="000000000000a9736c05a02c787b"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2a00:1450:4864:20::42b
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 06 Mar 2020 10:29:48 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--000000000000a9736c05a02c787b
Content-Type: text/plain; charset="UTF-8"

Hey there,

tail -n + NUM does not return the desired output. +NUM starts from the top
of the file, not from the bottom.

So for example, given the following file:

>this
>is
>an
>example
>file
>each
>word
>represents
>a
>line

and executing tail -n +3 example, I am getting

>example
>file
>each
>word
>represents
>a
>line

instead of


>this
>is
>an
>example
>file
>each
>word

I am using *tail (GNU coreutils) 8.28 *in latest ubuntu 18.04 LTS

Thanks in advance for looking into this :)

-- 
// Moraitidis D. Dimitris,
// Athens University of Economics and Business (AUEB)
// Department of Informatics

--000000000000a9736c05a02c787b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hey there,<div><br></div><div>tail -n=C2=A0+ NUM does not =
return the desired output.=C2=A0+NUM starts from the top of the file, not f=
rom the bottom.</div><div><br></div><div>So for example, given the followin=
g file:</div><div><br></div><div>&gt;this<br>&gt;is<br>&gt;an<br>&gt;exampl=
e<br>&gt;file<br>&gt;each<br>&gt;word<br>&gt;represents<br>&gt;a<br>&gt;lin=
e<br><br></div><div>and executing tail -n=C2=A0+3 example, I am getting<br>=
<br>&gt;example<br>&gt;file<br>&gt;each<br>&gt;word<br>&gt;represents<br>&g=
t;a<br>&gt;line<br><br>instead of=C2=A0<br><br><div><br></div><div>&gt;this=
<br>&gt;is<br>&gt;an<br>&gt;example<br>&gt;file<br>&gt;each<br>&gt;word</di=
v><br></div><div>I am using=C2=A0<b>tail (GNU coreutils) 8.28 </b>in latest=
 ubuntu 18.04 LTS</div><div><br>Thanks in=C2=A0advance for looking=C2=A0int=
o this :)<br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr" class=3D"=
gmail_signature" data-smartmail=3D"gmail_signature"><span style=3D"color:rg=
b(102,102,204)">// Moraitidis D. Dimitris,</span><br style=3D"color:rgb(102=
,102,204)"><span style=3D"color:rgb(102,102,204)">// Athens University of E=
conomics and Business (AUEB)</span><br style=3D"color:rgb(102,102,204)"><sp=
an style=3D"color:rgb(102,102,204)">// Department of Informatics</span>=C2=
=A0<br></div></div></div>

--000000000000a9736c05a02c787b--




Acknowledgement sent to Dimitris Moraitidis <dimitris.moraitidis@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#39951; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 6 Mar 2020 15:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.