SED!

Matt Alexander plug-discuss@lists.plug.phoenix.az.us
Sat, 20 Apr 2002 18:33:23 -0700 (PDT)


This will do it for you:

sed 's/.*/z=z+&/' somefile

Here's how it works...  the .* matches everything in each line.  The &
represents what we searched for.  For example, If you wanted to have ABC at the end of each line, you could do this:

sed 's/.*/&ABC/' somefile


On Sun, 21 Apr 2002, Support wrote:

> HI
>
> 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.
> 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
>
> thats it 1 simple column! Maybe I need some sleep it is 1 am here in
> Germany.
>
> Thanks for any help!
> (I know you are out there der hans) :)
>
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
>
> PLUG-discuss mailing list  -  PLUG-discuss@lists.plug.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>