You are not logged in.
Pages: 1
# pacman -Qo /usr/bin/tail
/usr/bin/tail is owned by coreutils 7.1-2
# tail +2 /etc/hosts
tail: cannot open `+2' for reading: No such file or directory
==> /etc/hosts <==
# /etc/hosts: static lookup table for host names
#
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost
...
# End of file
Last edited by sullivanva (2009-04-05 04:16:34)
--HAPS
Offline
Offline
tail -2 does something different than tail +2
I have a workaround, though
Instead of
tail +2 <file>
use
tail -n +2 <file>
Not really solved though.
--HAPS
Offline
according to the manpage that is the correct behavior
tail [-f | -r] [-b number | -c number | -n number | -number] [file ...]
note no +number
Offline
From the manpage:
-n, --lines=N
output the last N lines, instead of the last 10; or use +N to
output lines starting with the Nth
Expected behaviour
# pacman -Qo /usr/bin/tail
/usr/bin/tail is owned by coreutils 6.12-1
# tail +2 /etc/hosts
# /etc/hosts: static lookup table for host names
#
#<ip-address> <hostname.domain.org> <hostname>
...
# End of file
--HAPS
Offline
Read the manpage _carefully_ - what you want is
tail -n +2
or
tail --lines=+2
Offline
Actually, I was posting the information for your benefit, since it's a change that may mess up some of your scripts as it did mine.
See the following for reference.
https://bugzilla.redhat.com/show_bug.cgi?id=287751
They are not changing it back.
--HAPS
Offline
Pages: 1