Entering edit mode
4.9 years ago
arraychip
▴
30
Suppose there's a tabular file with 5 columns; 1st column is a title/gene, and 2nd through 5th contains values. I can sort for 2nd coulmn;
sort -k 2 myfile.txt > my_C2_sorted.txt
And for 3rd, 4th and fifth columns. Separately.
How can I do these 4 operations in one command?? And get 4 separate resulting file??
my_C2_sorted.txt
my_C3_sorted.txt
my_C4_sorted.txt
my_C5_sorted.txt
Thanks for your help