Results 1 to 3 of 3
I need to update very old mail files to make them mbox compliant. What I need to do is find all lines beginning with ^To: and put a comma between ...
- 06-11-2010 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 2
Sed script help
I need to update very old mail files to make them mbox compliant. What I need to do is find all lines beginning with ^To: and put a comma between a random number of names on this To: line. So I want to replace the 2nd and all subsequent <space> on this lines with ,<space>.
It should be something like:
s/^To: [ ]/&,/2g
But that isn't correct. Any help?
Thanks
J. Craig
- 06-11-2010 #2Linux User
- Join Date
- Jan 2007
- Location
- cleveland
- Posts
- 452
welcome to the forum
can you supply an example, of the input...and what you want as output?the sun is new every day (heraclitus)
- 06-11-2010 #3Just Joined!
- Join Date
- Jun 2010
- Posts
- 2
Solved
Brute force - I couldn't elegantly find a single sed command so I piped the output of one sed command to another.
Thanks
J. Craig


Reply With Quote