SED!

Kevin Buettner plug-discuss@lists.plug.phoenix.az.us
Sun, 21 Apr 2002 10:37:13 -0700


On Apr 21, 12:59am, Support wrote:

> Any sed gurus on the list? I use it often in a class I am taking but I 
> am stuck on this one and have had no luck with the docs I have found. 

Which docs are you reading?

> What I need to do is append 'z=z+' to the beginning of every line in a 
> file.
> 
> The file looks like this:
> 
>                  1234960
> 		1456780
> 		3456567
> 		5476865
> 		456098

If you want to prepend 'z=z+' to the beginning of every line, then
the following sed command will do it:

    sed -e 's/^/z=z+/' infile >outfile

Kevin