the below is sorted as it is. the fields that i'm interested in are the 4th and 5th field.
i want to sort the based on the 4th field.
Hi, I've got a file that I'd like to uniquely sort based on column 2 (values in column 2 begin with "comp").
I tried
Code:
sort -t -nuk2,3 file.txt
But got:
sort: multi-character tab `-nuk2,3'
"man sort" did not help me out
Any pointers?
Input:
Quote:
gi|328725975|ref|XP_003248692.1| comp47911_c0_seq1 82.02 367 66 0 1 3
Suppose I have a file containing :-
1 Apple $50
2 Orange $30
3 Banana $10
4 Guava $25
5 Pine@apple $12
6 Strawberry $21
7 Grapes $12
In the 5th row, @ character inserted.
I'm trying to sort the following file:
a 2
b 1
a 10
I need to get:
a 2
a 10
b 1
I know about the -kPOS[opts] option, and try to use it:
sort -k1 -k2n file
but this command gives me only:
a 10
a 2
b 1
So it sorts by the first column, but no by the second.
Hi guys,
I am trying to sort numbers in the string in descending order but for some reason sort fails.
Code:
n129$ echo "81 240" | sort -r
81 240
n129$
I am not sure what am I doing wrong. Is there a 100% reliable way to make sure that sort will always work. I mean on SUNS and IBM machines.
Thanks a lot.
Hi guys
I have a problem trying to sort output produced with the help of 'Awk'.
After "grepping" the pattern out of the file and sorting it, sort command acts a little strange:
Code:
$ grep -w -n -i "p[0-9]*cmo" /bb/data/rmt4db.lrl | sort -r
32:P1096CMO 63836 344 passthru
31:P1084CMO 121335 329 passthru
30:P102CMO 27889 115 passthru
29:P101CMO 28371 336 passthru
2
I am passing a list of strings $list and want to remove all entries with --shift=number, --sort=number/number/..., --group=number/number/...
I'm trying to get the universities result data into different file, where the $9 contains unversity field and field7,4 & 5 contains the keys to sort the students by marks. How to use uni variable to match against $9 inside awk?
I have a file which looks roughly like this:
996 mmmmmmm
996 xxxxxxxxxxxxx
99600 ssssssssss
9964 fffffffffffff
and would like to sort it numerically on the first field.