[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: incorrectly sorted file with snow leopard sort
From: |
Eric Blake |
Subject: |
Re: incorrectly sorted file with snow leopard sort |
Date: |
Tue, 03 Nov 2009 19:03:51 -0700 |
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 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Eric Blake on 11/3/2009 6:59 PM:
> According to Kamil Dudka on 11/3/2009 1:16 PM:
>> On Tuesday 03 of November 2009 19:23:18 emmanuel poirier wrote:
>>> Attachment: list-of-groups-greetings.txt
>> $ cat list-of-groups-greetings.txt | tr -d "\r" | sort
>
> Useless use of cat.
>
> tr -d "\r" < list-of-groups-greetings.txt | sort
Also, "\r" is not portable - some shells treat it as "r", others as "\\r".
For portability, use:
tr -d '\r' < list-of-groups-greetings.txt | sort
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----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/
iEYEARECAAYFAkrw4QcACgkQ84KuGfSFAYDV6QCdGC0JALmQL4N51rUeiZQK6dZX
C0QAoJROHxSOjqC/PbSVW2vwQI2uKOXs
=Rocb
-----END PGP SIGNATURE-----