Advertisement
metalx1000

Split file by string with AWK

Aug 4th, 2017
955
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.22 KB | None | 0 0
  1. awk '/YOUR_TEXT_HERE/{n++}{print >"out" n ".txt" }' final.txt
  2.  
  3. -------------------example--------------
  4. wget "http://pastebin.com/raw.php?i=nCVVCsE8" -O original.lst
  5. awk '/:/{n++}{print >"out" n ".txt" }' original.lst
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement