The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-30-2006
spookyrtd99
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Question How to split file by tags inside file?

How can I split the file by the tags that are inside the file???
Not too sure how to use cut and/or awk to do this.
Thanks
spooky


file.txt
------
<filename>output.txt</filename>
Line 1 of 5
<filename>output1.txt</filename>
Line 2 of 5
Line 3 of 5
<filename>output2.txt</filename>
Line 4 of 5
Line 5 of 5

has created 3 files with there relevant data. I.e. ;
output.txt
----------
Line 1 of 5

output1.txt
-----------
Line 2 of 5
Line 3 of 5

output2.txt
-----------
Line 4 of 5
Line 5 of 5