How to print the header of bed file and the lines that belong to chromosome 2
I have a bed file consists of many lines and I want to extract the header and the lines that belong to chromosome 2 only in another file
• 2,410 views
•
link
2 answers
awk 'NR == 1 || ($1=="chr2")' lamina.bed
• 0 views
•
link
Log in to answer this question.