Sed abandon the X character
I'm looking for a sed command to strip characters from the 11th (and thus keep the first 10) on lines starting with ">". So I want to basically change this file
>LEP004_Iphiclides_podalirius
GCCTCGGCTCACTTGGAAGGTGG
>LEP054_Danaus_plexippus
GGTCGTTGACCTCACTGTTTGCA
Next:
>LEP004_Ip
GCCTCGGCTCACTTGGAAGGTGG
>LEP054_Da
GGTCGTTGACCTCACTGTTTGCA
I tried this command: sed -n '= / {s / ^ (. {10}). * / \ 1 / g; p}' seq.fas> seq_modif.fas, but it just prints the sequence headers (not the sequences DNA)
Thank!
+3
source to share
3 answers