I have the need to turn this:
Code:
1 server=hotspot1 name="tsmith" password="password" profile=package5
uptime=22m45s bytes-in=2238756 bytes-out=14770276 packets-in=14837
2 server=hotspot1 name="jbob" password="password" profile=package5
uptime=3m3s bytes-in=92196 bytes-out=952379 packets-in=849
into this (a few hundred times):
Code:
1 server=hotspot1 name="tsmith" password="password" profile=package5 uptime=22m45s bytes-in=2238756 bytes-out=14770276 packets-in=14837
2 server=hotspot1 name="jbob" password="password" profile=package5 uptime=3m3s bytes-in=92196 bytes-out=952379 packets-in=849
Unfortunately this is an excerpt from a file generated by a router and I do not have any control over how the file is formatted.
I used this:
Code:
sed -e :a -e '$!N;s/\r\n //;ta'
and that produces what I want, but for group 1 only, it doesn't repeat for group 2, group 3, etc. I also tried running that command in a while read $line loop:
Code:
uptime=22m45s bytes-in=2238756 bytes-out=14770276 packets-in=14837
2 server=hotspot1 name="jbob" password="password" profile=package5
uptime=3m3s bytes-in=92196 bytes-out=952379 packets-in=849
And it appears to delete the first line of the text, then no affect after that.
Anyone know how to accomplish this?