Article 4VKB9 tr or sed ? or some other tool

tr or sed ? or some other tool

by
dmchess
from LinuxQuestions.org on (#4VKB9)
I had some personal data on a web site, I copied and pasted it to a text editor and saved it. Unfortunately, each line of the web site had (which had 6 fields) became six separate lines. I used the tr command to change all the new-lines to semicolons. The last field was identical in all but two records, so I used sed to change that end of field back to a new line. Then I just did minor edits to fix the other two lines. I then used a simple pascal program to suck the data into a mysql table.

My question is, if that last field hadn't had mostly identical data. Is there a way to force a newline after every 6th field?

Terry H.latest?d=yIl2AUoC8zA latest?i=0Z6uWg6AgBA:kxiab-TMNSE:F7zBnMy latest?i=0Z6uWg6AgBA:kxiab-TMNSE:V_sGLiP latest?d=qj6IDK7rITs latest?i=0Z6uWg6AgBA:kxiab-TMNSE:gIN9vFw0Z6uWg6AgBA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments