Reputation: 2177
Im having a file which contains data in the below format.
<data1/><data2/><data3/>.........<dataN/>
How can i convert the data into the below format
<data1/>
<data2/>
<data3/>
.........
<dataN/>
Upvotes: 0
Views: 161
Reputation: 785108
Using grep -o
you can do:
grep -o '<[^>]*>' file
<data1/>
<data2/>
<data3/>
<dataN/>
Upvotes: 1