Hi all,
I have a file of around 300 lines in which string "SERVER" occurs around 32 times.
for eg.
Quote:
SERVER
.....
.....
....
SERVER
.....
.....
....
SERVER.....
.....
....
|
I need to split files like, for eg
Quote:
file1
SERVER
....
....
....
file2
SERVER
.....
...
....
file3
SERVER
.....
....
....
|
I am using this code
awk '/SERVER/{n++}{print > f n}' f=/vikas/list /vikas/final
But the problem is that it makes maximum of 10 files, but I need more than 30.
I have tried using nawk, but didnt worked. This cmd is running fine in Linux, But not in Sun OS (Solari

.
I am using bash scripting on Sun OS.
Any other way of splitting this data ???
Pls help !!!
Thanks in adv.
Regards,
Vikas