Guest User

Untitled

a guest
Aug 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. Extracting data out of a huge text file
  2. head -n 532541 big-file > first-bit
  3.  
  4. awk 'NR<=532541' big > small
  5. awk '{if(NR<=532541) print; else exit}' big > small #if the file is really huge
  6. sed -n '1,532541p' big > small
  7. sed '1,532541!d' big > small
  8. sed '532542,$d' big > small
  9.  
  10. sed '532541q' big > small
  11. awk '{print} NR==532541 {exit}' big > small
Add Comment
Please, Sign In to add comment