SED!

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Kevin Buettner
日付:  
題目: SED!
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