I use importing systems based on delimited text files. The files used can sometimes be almost 2 Gb big and I have to check some lines from that file.
So I want to know how can I output (on another file, or just on screen) the lines of specific value? E.g. line number 1010123, 1002451, 994123, etc., exactly as they are in the source file?
I use importing systems based on delimited text files. The files used can sometimes
Share
To print line
N, use:To print multiple lines (assuming they are in ascending order) e.g. 994123, 1002451, 1010123:
The
qafter the last line number tellssedto quit when it reaches the 1010123th line, instead of wasting time by looping over the remaining lines that we are not interested in. That is why it is efficient on large files.