difference in the tail command between most Linux distros and Fedora

bob 295 icanprogram-sKcZck+fQKg at public.gmane.org
Mon Dec 15 16:08:30 UTC 2008


On December 15, 2008 10:31 am, Chris F.A. Johnson wrote:
> 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.

Thanks.    That works.

bob

--
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