1
1
I want to sort my file by first column but I have to start sort from 5 character. How can I do that?
My file:
"TTTTCTTACA" 1 1
"TTTTCTTACC" 1
"TTTTCTTACT" 1 1
"TTTTCTTAGC" 1
"TTTTCTTATT" 2
"TTTTCTTCAA" 1 1 1
"TTTTCTTCAG" 1 2 1
"TTTTCTTCAT" 1 2 2
"TTTTCTTCCT" 2
"TTTTCTTCGG" 2 2
"TTTTCTTCTA" 1
"TTTTCTTCTG" 1
"TTTTCTTCTT" 1 2
"TTTTCTTGAA" 1
"TTTTCTTGCT" 1 1 1
"TTTTCTTTAA" 1
"TTTTCTTTAG" 1 1
"TTTTCTTTCT" 1
"TTTTCTTTGC" 1
"TTTTCTTTGG" 1 1
"TTTTCTTTGT" 1 1 2 1
"TTTTCTTTTA" 1
I was trying:
sort -k1,1 file | uniq -s 6 -w 5
Of course, it doesn't work. Mayby sort has some flags, but I didn't find them. Do you have some idea?
"I want to sort my file by first column" - Your data is already sorted by the first column. Please explain what you are really trying to do. – DavidPostill – 2016-06-25T13:08:08.367