X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org From: "Dave Korn" To: References: <015901c939d8$b22295e0$9601a8c0 AT CAM DOT ARTIMI DOT 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: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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 AT ori ~]$ export POSIXLY_CORRECT=1 [dk AT 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 AT 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/