bug-textutils
[Top][All Lists]
Advanced

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

Sorting on the first column creating problem


From: srinivas
Subject: Sorting on the first column creating problem
Date: Mon, 8 Oct 2001 19:47:26 +0530

hi

i have downloaded the textutils utility and it is working fine except for
one problem.
Could you please help me out?

I have a comma separated text file(try3.csv) with the following sample data:

a,afile
a,gfile
a,zfile
a,bfile
a,filea
a,filea
a,filea

Please note that each of the columns are variable in length but separated by
commas.

I would like to sort the file on the first column for which i had given the
following command line arguments
sort -o output.txt -t , -k1 try3.csv.

The output is as follows
a,afile
a,bfile
a,filea
a,filea
a,filea
a,gfile
a,zfile

Here the second column also has been sorted which is not the output
required.As per my understanding, sorting the input on the first column
should have produced an output similar to the input.

Could you please guide me in this problem?

Thanks and regards

Srinivas
pune
India




reply via email to

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