Hi,
I have a file in the following format. I want to break the file into seperate files based on [Local], [Global]...... These separators are predefined.
I tried getting line number for the variables using awk. But did not work.
regards,
[Local]
JDoe12345,John Doe,,Product Division - Materials,,simon,,ukuser
HDoe32456,Harry Doe,,sales Division - Materials,motif,,,usauser
.
.
#All the above lines should be output to a file
[Global]
LDoe12345,Larry Doe,august,Product Division - spares,,,,reguser
KDoe32456,Karen Doe,,Product Division - spares,,,all,usauser
..
#All the above lines from [Global] should be output to a different file
[Network]
similar to above
..
#All the above lines from [Network] should be output to a different file
I have a file in the following format. I want to break the file into seperate files based on [Local], [Global]...... These separators are predefined.
I tried getting line number for the variables using awk. But did not work.
regards,
[Local]
JDoe12345,John Doe,,Product Division - Materials,,simon,,ukuser
HDoe32456,Harry Doe,,sales Division - Materials,motif,,,usauser
.
.
#All the above lines should be output to a file
[Global]
LDoe12345,Larry Doe,august,Product Division - spares,,,,reguser
KDoe32456,Karen Doe,,Product Division - spares,,,all,usauser
..
#All the above lines from [Global] should be output to a different file
[Network]
similar to above
..
#All the above lines from [Network] should be output to a different file