Thread
:
split files by specifying a string (bash shell)
View Single Post
#
4
(
permalink
)
10-30-2007, 03:48 AM
nixcraft
Never say die
User
Join Date: Jan 2005
Location: BIOS
My distro: Any distro with shell
Posts: 962
Rep Power:
10
Try
Code:
awk '/SERVER/{n++}{print >"out" n ".txt" }' final.txt
It will read input from final.txt and produced out1.txt, out2.txt... out30.txt
__________________
Vivek
|
My personal blog
Linux Evangelist
Play hard stay cool
nixcraft
View Public Profile
Send a private message to nixcraft
Visit nixcraft's homepage!
Find all posts by nixcraft