How do I achieve this? I have A, B and A/B in different variables in a file in col2.
I want them to sort in such a way, that the variables appear together, and within a variable, the data is sorted in the order A,B and then A/B. If I sort on the second column, the order becomes A, A/B, B but I want A,B,A/B.
Hi,
This is my input file:
ali 5 usa abc
abu 4 uk bca
alan 6 brazil bac
pinky 10 utah sdc
My desired output:
pinky 10 utah sdc
alan 6 brazil bac
ali 5 usa abc
abu 4 uk bca
Based on the column two, I want to do the descending order and print out other related column at the... (3 Replies)
Hello,
I am running on AIX.I have a question about sorting in UNIX.
if my file is something like this:
a c
b d
a b
b c
a a
I want to sort on column 1 only. The following statement does not seem to work, it still considers the rest of the line in the sorting results: sort... (2 Replies)
How to sort based on the 4 the column . The input data has a header and output needs to be sorted based on the 4th column rbcid.
I tried below code but not getting results
sort -u -t'|' -k4,4r file1 > file2
time|tourit|nofdays|rbcid|blank|type|value|nill|valuedesc|name... (6 Replies)
Hi,
I have two text files
file 1 with N lines
AAAAA 2.092290E-12
BBBBB 1.727740E-07
CCCCC 9.608710E-17
DDDDD 0.000000E+00
EEEEE 0.000000E+00
FFFFF 0.000000E+00
GGGGG 0.000000E+00
HHHHH 0.000000E+00
IIIII 3.300320E-04
...
The text in the first column is unique for each row and... (4 Replies)
Hi,
I am using SUN SOLARIS (SunOS sun4v sparc SUNW, T5240).
I have a huge data file with header and trailer. This file gets used into an ETL process. ETL skips the header record (which is the first record of the file) and loads the rest of the record. The file can be delimited (comma,... (5 Replies)
How to sort the following output based on lowest to highest BE?
The following sort does not work.
$ sort -t. -k1,1n -k2,2n bfd.txt
BE31.116 0s 0s DOWN DAMP
BE31.116 0s 0s DOWN DAMP
BE31.117 0s 0s ... (7 Replies)
I have a string of pre defined ip address list which will always remain constant their order will never change like in below sample:
iplist=8.8.5.19,9.7.5.14,12.9.9.23,8.8.8.14,144.1.113
In the above example i m considering only 5 ips but there could be many more.
Now i have a file which... (15 Replies)