Я просто хочу удалить все перед символом второй трубы (включая символ трубы) до знака больше, чем (оставив его).К сожалению, я новичок и не нашел в сети похожей проблемы.
например,
>ENA|FXSY01000001|FXSY01000001.1
AAAATCTTATTTTATTTTTTCCCTGTCGGCAGCAATTCATTCACCCCCTCACTTTTTAAT
ATTTTTAACTGCAAGATGAATAAAAATAAATTTTTCTCTCCACTCCATCATCCTGCTATA
TACATTTTTACTTTTTTTAATATTTTCCTTCCAATCATCACTACTTTATTTTTATTTCC
>ENA|FXSY01000001|FXSY01000002.1
AAAATCTTATTTTATTTTTTCCCTGTCGGCAGCAATTCATTCACCCCCTCACTTTTTAAT
ATTTTTAACTGCAAGATGAATAAAAATAAATTTTTCTCTCCACTCCATCATCCTGCTATA
TACATTTTTACTTTTTTTAATATTTTCCTTCCAATCATCACTACTTTATTTTTATTTCC
>ENA|FXSY01000001|FXSY01000003.1
AAAATCTTATTTTATTTTTTCCCTGTCGGCAGCAATTCATTCACCCCCTCACTTTTTAAT
ATTTTTAACTGCAAGATGAATAAAAATAAATTTTTCTCTCCACTCCATCATCCTGCTATA
TACATTTTTACTTTTTTTAATATTTTCCTTCCAATCATCACTACTTTATTTTTATTTCC
повторно отредактировать из @ VJC Новое требование для вывода:
>FXSY01000001.1
AAAATCTTATTTTATTTTTTCCCTGTCGGCAGCAATTCATTCACCCCCTCACTTTTTAAT
ATTTTTAACTGCAAGATGAATAAAAATAAATTTTTCTCTCCACTCCATCATCCTGCTATA
TACATTTTTACTTTTTTTAATATTTTCCTTCCAATCATCACTACTTTATTTTTATTTCC
>FXSY01000002.1
AAAATCTTATTTTATTTTTTCCCTGTCGGCAGCAATTCATTCACCCCCTCACTTTTTAAT
ATTTTTAACTGCAAGATGAATAAAAATAAATTTTTCTCTCCACTCCATCATCCTGCTATA
TACATTTTTACTTTTTTTAATATTTTCCTTCCAATCATCACTACTTTATTTTTATTTCC
>FXSY01000003.1
AAAATCTTATTTTATTTTTTCCCTGTCGGCAGCAATTCATTCACCCCCTCACTTTTTAAT
ATTTTTAACTGCAAGATGAATAAAAATAAATTTTTCTCTCCACTCCATCATCCTGCTATA
TACATTTTTACTTTTTTTAATATTTTCCTTCCAATCATCACTACTTTATTTTTATTTCC
с предложением Shellter'а он дал мне следующий вывод: awk -F\| '/^>/{print ">" $NF}1' file > newFile
>FXSY01000001.1
>ENA|FXSY01000001|FXSY01000001.1
AAAATCTTATTTTATTTTTTCCCTGTCGGCAGCAATTCATTCACCCCCTCACTTTTTAAT
ATTTTTAACTGCAAGATGAATAAAAATAAATTTTTCTCTCCACTCCATCATCCTGCTATA
TACATTTTTACTTTTTTTAATATTTTCCTTCCAATCATCACTACTTTATTTTTATTTCC
>FXSY01000002.1
>ENA|FXSY01000001|FXSY01000002.1
AAAATCTTATTTTATTTTTTCCCTGTCGGCAGCAATTCATTCACCCCCTCACTTTTTAAT
ATTTTTAACTGCAAGATGAATAAAAATAAATTTTTCTCTCCACTCCATCATCCTGCTATA
TACATTTTTACTTTTTTTAATATTTTCCTTCCAATCATCACTACTTTATTTTTATTTCC
>FXSY01000003.1
>ENA|FXSY01000001|FXSY01000003.1
AAAATCTTATTTTATTTTTTCCCTGTCGGCAGCAATTCATTCACCCCCTCACTTTTTAAT
ATTTTTAACTGCAAGATGAATAAAAATAAATTTTTCTCTCCACTCCATCATCCTGCTATA
TACATTTTTACTTTTTTTAATATTTTCCTTCCAATCATCACTACTTTATTTTTATTTCC
, но исправил это с помощью: sed '/^#/ d' < inputFile.txt > outputFile.txt
>FXSY01000001.1
AAAATCTTATTTTATTTTTTCCCTGTCGGCAGCAATTCATTCACCCCCTCACTTTTTAAT
ATTTTTAACTGCAAGATGAATAAAAATAAATTTTTCTCTCCACTCCATCATCCTGCTATA
TACATTTTTACTTTTTTTAATATTTTCCTTCCAATCATCACTACTTTATTTTTATTTCC
>FXSY01000002.1
AAAATCTTATTTTATTTTTTCCCTGTCGGCAGCAATTCATTCACCCCCTCACTTTTTAAT
ATTTTTAACTGCAAGATGAATAAAAATAAATTTTTCTCTCCACTCCATCATCCTGCTATA
TACATTTTTACTTTTTTTAATATTTTCCTTCCAATCATCACTACTTTATTTTTATTTCC
>FXSY01000003.1
AAAATCTTATTTTATTTTTTCCCTGTCGGCAGCAATTCATTCACCCCCTCACTTTTTAAT
ATTTTTAACTGCAAGATGAATAAAAATAAATTTTTCTCTCCACTCCATCATCCTGCTATA
TACATTTTTACTTTTTTTAATATTTTCCTTCCAATCATCACTACTTTATTTTTATTTCC