bug-textutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HOW TO SORT


From: eurlix
Subject: HOW TO SORT
Date: Mon, 17 Feb 2003 22:15:01 +0100

Hello gentlemen,

I try to sort a little file (39 lines) obtained with a ls -l
and modified by editor (there is no tab in the file).
I have tried with many differents parameters like :
# export LANG=C ; sort +0.0 -0.3 -r +0.34 -0.40 +0.12 -0.20 -r -oalire Alire
# export LANG=C ; sort +0.0 -0.3 -r +0.34 -0.40 +0.12 -0.20  -oalire Alire
# export LANG=C ; sort -k1.1,1.3 -r -k1.35,1.40 -k1.13,1.20 -r -oalirk Alire
# export LANG=C ; sort -s -k1.1,1.3 -r -k1.35,1.40 -d -k1.13,1.20 -b -n -r 
-oalirk1 Alire
export LANG=C ; sort -s -k1.1,1.3 -ir -k1.35,1.40 -d -k1.13,1.20 -bnr -oalirk2 
Alire

This is a part of the file :
Prog CNV
OUI         22213632 jan 21  2002 MVSTOCKN2
oui         27123712 jan  7  2002 FSTOLDN2   idem FSTOCKN2
??? pas MPP  4794368 jan 21  2002 STATOPS2
NON          4527104 jan 21  2002 STATSAIS2

The first field contains only oui, Pro, OUI, NON, ???, as above, which i was 
hoping
in this order, according to the hexadecimal calue of the first character ;
the second field is partial name of the file, the third the size.
With the two last commands, the file is sorted only on the size.

Export LANG=C; is because I suspect the locales to make some stranges things.

I work with a Mandrake 8.0 and when I type "sort --version" I obtain only a (C) 
1999
but /bin/sort is 32188 stamped mar 31 2001.

Has a froggy eaten a part of it ?  ^-) or it's a bug

Seriously, how I can sort a file as i like ?

Thank you very much and
best regards,
-- 
Alain Lucari    Eurlix
1, rue Reine Elisabeth von Witellsbach
       (Reine des Belges)
13001 Marseille
FRANCE




reply via email to

[Prev in Thread] Current Thread [Next in Thread]