Subject: bug#33622: coreutils v. 8.30 – Tail prints the first row in 'tail -n <N>'

From: Assaf Gordon <[email-masked]>
Date: Sat, 22 Dec 2018 22:46:44 -0700

tags 33622 notabug
close 33622
stop

Hello,

On 2018-12-05 5:49 a.m., Kamil Dudka wrote:
> On Wednesday, December 5, 2018 11:51:09 AM CET Ricky Tigg wrote:
>> OS: *Fedora*. Component: coreutils.x86_64 8.30-6.fc29 @System
>>
>> Tail prints the first row in 'tail -n <N>'
>>
>> Command executed:
>> $ dnf repoquery --requires bash --recursive --resolve | grep -E
>> '.x86_64$|.noarch$' | tail -n 1
>> Last metadata expiration check: 0:28:25 ago on Wed Dec  5 11:09:16 2018.
>> tzdata-0:2018g-1.fc29.noarch
>>
>> Expected result: command to only print N rows, which means without printing
>> the first row.
> 
> The line "Last metadata expiration check: [...]" is not printed by tail
> at all.  It is printed by dnf to standard _error_ output.  You will see
> it even if you redirect dnf's standard output to /dev/null:
> 
> $ dnf repoquery --requires bash --recursive --resolve >/dev/null
> Last metadata expiration check: [...]
> 
> You can use `dnf --quiet ...` to suppress the message.

Thank you Kamil for explaining the issue.

I'm closing this as "notabug".

-assaf