[WNYLUG-Users] sed

paul at paulcosta.com paul at paulcosta.com
Wed Feb 17 21:47:21 EST 2010

Hey Guys.

I have a bunch of text files that I need to manipulate.
I can manually do it in a text editor but it would take many many hours

I think sed can do what I  want but I don't know how
I am reading sed documentation but I need help

I want to insert text at the beginning of each line
then make the words that follow it start a new line 


This is the original text file

1 some text on this line 
2 some text on this line 
3 some text on this line 

This is what I want it to end up like

$$ Ge 1:1 
some text on this line 
$$ Ge 1:2 
some text on this line 
$$ Ge 1:3 

I want to keep the original numbers that each line has 
and insert $$ Ge 1: so it looks like $$ Ge 1:1
and start the text that follows to a new line

any help would be appreciated


More information about the Users mailing list