X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave.korn@artimi.com>
To: <cygwin@cygwin.com>
References: <f79359b60810290733t102346a1sb33f529eaa4da778@mail.gmail.com> 	 <015901c939d8$b22295e0$9601a8c0@CAM.ARTIMI.COM> <f79359b60810291038y38a38473uad379133258bc94f@mail.gmail.com>
Subject: RE: Problems with 'tail -n *'
Date: Wed, 29 Oct 2008 18:09:52 -0000
Message-ID: <017e01c939f1$8a605380$9601a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
Content-Type: text/plain; 	charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
In-Reply-To: <f79359b60810291038y38a38473uad379133258bc94f@mail.gmail.com>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Gustavo Seabra wrote on 29 October 2008 17:39:

>>  The "-NNN" form is an abbreviation for "-n NNN".  If you write it out
>> in full, it works: 
>> 
>> $ tail -n 2 *.dat
>> 
> 
> OK, I see that now. Thanks. But is there a reason why the abbreviation
> is not working in cygwin? It works just fine in a different system...

  From your original post:

> It works fine on a linux computer we have (tail (coreutils) 5.2.1).

> $ tail --version
> tail (GNU coreutils) 6.10

  So the reason is "because you're using different versions".  I would guess
that the behaviour was changed on purpose by the coreutils maintainers.
Looking at /usr/share/doc/coreutils-6.10/NEWS suggests there have been a
number of changes for POSIX conformance; and I notice:

"  In the following cases POSIX allows the default GNU behavior,
  so when POSIXLY_CORRECT is set:

  [ . . . ]

  tail supports two or more files when using the obsolete option syntax. "


  There may have been a regression arising; it doesn't seem to make any
difference to my testing if I set POSIXLY_CORRECT, or then again maybe
POSIXLY_CORRECT is defaulted on for Cygwin, because setting it on my Linux
system stops it from working and gives me an error message:

[dk@ori ~]$ export POSIXLY_CORRECT=1
[dk@ori ~]$ tail -2 *.txt
tail: too many arguments;  When using tail's obsolescent option syntax (-2)
there may be no more than one file argument.  Use the equivalent -n or -c
option instead.
[dk@ori ~]$ 


  I see Eric (the cygwin coreutils maintainer) has just sent a reply; let's
see what he has to say.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

