This question already has an answer here:
- Filter file by line number 10 answers
I have a large file (say
reads.fasta) which has around 5,000,000 lines and have another file
reads_of_interest which contains a list of the line numbers of
reads.fasta that I want to extract.
Is there an easy command line method to do this?
In other words, there is a file
large_file.txt. There is another file
line_numbers.txt which is of the form
12 134 1456
And I want to extract lines
large_file.txt. The number of lines I want to extract is of the order of 500,000.