[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tab as sort's field-separator
From: |
Jim Fohlin |
Subject: |
tab as sort's field-separator |
Date: |
Sat, 15 Jun 2002 02:26:12 -0400 |
User-agent: |
Mutt/1.2.5i |
Hi,
It appears that one can't specify just a tab (a tab and only a tab) as
sort's field-separator. As shown below, the UNIX example does it
right whereas the Linux example fails.
Is this a bug/limitation or did I miss the correct way to do this?
I can work around this in bash using:
TAB=`echo -e "\t"`
sort -t"$TAB" ...
but this trick doesn't work with tcsh using:
setenv TAB `/bin/echo -e "\t"`
Must be the different way expressions are expanded with quotes in the
two shells.
Jim
$ cat /tmp/x
2 x, a1
2 x, b
1 x, a2
NB: Each line consists of <digit><tab>x,<space><letter><optionaldigit>
***
RH 7.2, textutils-2.0.14-2
$ sort -t'\t' -u -k2,2 -k1,1 /tmp/x
sort: multi-character tab `\t'
***
Compaq Tru64 UNIX V5.1 (Rev. 732)
% sort -t'\t' -u -k2,2 -k1,1 /tmp/x
2 x, a1
1 x, a2
2 x, b
***
- tab as sort's field-separator,
Jim Fohlin <=
- Re: tab as sort's field-separator, Andrew D Jewell, 2002/06/16
- Re: tab as sort's field-separator, jcf, 2002/06/17
- Re: tab as sort's field-separator, Bob Proulx, 2002/06/17
- Re: tab as sort's field-separator, jcf, 2002/06/17
- Re: tab as sort's field-separator, Andrew D Jewell, 2002/06/17
- Re: tab as sort's field-separator, Bob Proulx, 2002/06/17
- Re: tab as sort's field-separator, Bob Proulx, 2002/06/18
- Re: tab as sort's field-separator, Paul Eggert, 2002/06/18
Re: tab as sort's field-separator ... works fine given a tab, Jim Fohlin, 2002/06/19