delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/10/29/09:33:45

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <f79359b60810290733t102346a1sb33f529eaa4da778@mail.gmail.com>
Date: Wed, 29 Oct 2008 10:33:19 -0400
From: "Gustavo Seabra" <gustavo DOT seabra AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Problems with 'tail -n *'
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hi All,

I just noticed this one thing when using 'tail' in cygwin. For some
reason, when using a '*' so as to 'tail' multiple files at once, the
'-n' option to tail doesn't work anymore. Note that I tried without
the '-n', and it works just as it should, i.e., 'tail *.dat' actually
gives teh last 10 lines of each '.dat' file (I'm not showing this
example just to save space). It is only the '-n' option that doesn't
work anymore. It works fine on a linux computer we have (tail
(coreutils) 5.2.1). See an example below:

$ which tail
/usr/bin/tail
$ tail --version
tail (GNU coreutils) 6.10
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Rubin, David MacKenzie, Ian Lance Taylor, and Jim Meyering.

$ tail -2 am1_avg-ie.dat
     5.998     1.5559    -5.3844    -6.0068
     6.000     1.5568    -5.3841    -6.0066

$ tail -2 *.dat
tail: option used in invalid context -- 2


All the best,
Gustavo

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019