difference in the tail command between most Linux distros and Fedora

Chris F.A. Johnson cfaj-uVmiyxGBW52XDw4h08c5KA at public.gmane.org
Mon Dec 15 15:31:45 UTC 2008

On Mon, 15 Dec 2008, bob 295 wrote:

> If you look at the reference for the tail command it talks to the option to
> specify a +n  so that tail starts n lines from beginning of file.
> As an experiment create a 5 line text file called bob.    Then
> tail +3 bob
> should dump lines 3-5.
> Except on Fedora systems.     Apparently they have a different flavor of tail
> which doesn't recognize the + sign and tries to open a file call "+3".
> Does anyone have any history as to why this might be so?    Any work arounds?

     The POSIX specs do not allow for the +3 syntax; it should be -n+3.
     Most versions of tail allow both. For a short while there was a
     version in the wild that didn't allow +3; it didn't last long, as
     compatibility with existing scripts was important. You must have
     that version.

    Chris F.A. Johnson, webmaster         <http://woodbine-gerrard.com>
    ========= Do not reply to the From: address; use Reply-To: ========
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists

More information about the Legacy mailing list