4 ms·
Yep. Need line 123425938039 of a gigantic file? [0] sed -e 'NR == 123425938039 { print; exit; }' < file Fast as hell and takes no memory to speak of. Go
by davidp 12y ago
Yep. Need line 123425938039 of a gigantic file? [0]
sed -e 'NR == 123425938039 { print; exit; }' < file
Fast as hell and takes no memory to speak of. Google 'awesome awk' for goodies.
[0]: Yes, this happens.
- eadler 12y agoWouldn't it be slightly easier to do something like sed -n 123425938039p file? To be fair, this one won't exit early.