Quantcast
Channel: FedoraForum.org
Viewing all articles
Browse latest Browse all 36189

split my file

$
0
0
Hi all,
i am looking for a way to split file into 4 groups.
my file looks like:
c0 c1 c2 c3
name1 1 3 5
name2 144 36 53
name3 14 10 7
name4 11 12 8

Tab is separate between fields.
i want group1 to be all names where c1>c2>c3
the result should be name3
group2 to be c1<c2<c3
result name1
group3 to be c1>c2<c3
result name2
group4 to be c1<c2>c3
result name4

Any idea of easy way?
Perl/bash..

Thanks,
Pap

Viewing all articles
Browse latest Browse all 36189

Trending Articles