delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/20/07:53:21

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL
X-Spam-Check-By: sourceware.org
Message-ID: <4B56FCD3.8080606@byu.net>
Date: Wed, 20 Jan 2010 05:53:39 -0700
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com, Peter DOT Koch AT prosozial DOT de
Subject: Re: 1.7.1: /usrb/bin/tail.exe
References: <889F761889B73C489CED80057EEE29DF032B5AD8 AT spsmail DOT prosozial DOT lokal>
In-Reply-To: <889F761889B73C489CED80057EEE29DF032B5AD8@spsmail.prosozial.lokal>
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

--------------enig1F8AD20E101557520D0AF444
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

According to Peter Koch on 1/20/2010 3:40 AM:
> The culprint is tail.exe
>=20
> 1. tail +N does not work anymore. Obsolete? How can i re-enable this?

http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Old-tail-plus-=
N-syntax-now-fails

'tail +2' is not portable.  Use 'tail -n +2'.


> 2. tail overwrites redirected files!
>=20
> $ echo "1" > a
> $ echo "22" >> a
> $ echo "333" >> a
> $ cat a
> 1
> 22
> 333
> echo "x" > x
> $ tail -1 a >> x
> $ cat x
> 333

Works for me:

$ cat a
1
22
333
$ echo 1 > x
$ tail -1 a >> x
$ cat x
1
333

I tested on both binary and text mounts.  Are you sure you used '>>', not '=
>'?

--=20
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9 AT byu DOT net


--------------enig1F8AD20E101557520D0AF444
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktW/NMACgkQ84KuGfSFAYDgNQCeNecbE5BhnuSNgvOvRLyTb2no
6R0AnReQX0UbCYNbZ0LYx1VOOkYVA/R8
=n7UO
-----END PGP SIGNATURE-----

--------------enig1F8AD20E101557520D0AF444--

- Raw text -


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