GNU bug report logs -
#11990
Tail does not behave as expected
Previous Next
Reported by: Rodolfo Aramayo <raramayo <at> gmail.com>
Date: Thu, 19 Jul 2012 16:16:02 UTC
Severity: normal
Tags: notabug
Done: Eric Blake <eblake <at> redhat.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 11990 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tag 11990 notabug
thanks
On 07/19/2012 09:25 AM, Rodolfo Aramayo wrote:
> Version:tail (GNU coreutils) 8.17
>
> Please take a look at this output:
>
> 261$ tail -1 supercont10r12_01_wt_-fasta.gff3
> Supercontig_10.1 protein2genome:Proteins_wt match_part 9771037 9771263
> 1679 - . ID=Supercontig_10.1:hsp:281564:96_0;Parent=Supercontig_10.1:hit:143095:96_0;Target=NCU10031T0
> 239 314;Gap=M76 R1
>
> [10:21:07][raramayo][/Volumes/g0006/00scontig101200_wt_maker/zmakerresults02]
>
> 262$ tail -1 supercont10r12_0{1..7}_wt_-fasta.gff3
> tail: option used in invalid context -- 1
>
>
> This is not what I expected
Telling us what you _did_ expect will go a long way to helping us
understand what you think is the bug. But my guess is that what is
happening is that the unquoted sequence '{1..7}' is being treated as a
shell glob that then expands into multiple file names, but we have
explicitly documented that the legacy option '-1' only works if you pass
a single file name. From 'info coreutils tail':
"For compatibility `tail' also supports an obsolete usage `tail
-[COUNT][bcl][f] [FILE]', which is recognized only if it does not
conflict with the usage described above. This obsolete form uses
exactly one option and at most one file."
If you want to list the last line of multiple files, you have to use '-n
1' instead of '-1'. Therefore, I'm closing this as not a bug. However,
feel free to continue to comment if you have further questions.
--
Eric Blake eblake <at> redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 12 years and 334 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.