Re: sed hates me

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Mike Garfias
Date:  
To: plug-discuss
Subject: Re: sed hates me
try:
sed "s/me/`whoami`/"

single quotes are passed without being interpreted by the shell, doubles have
the text between them interpreted.

Kevin spoke forth with the blessed manuscript:
> Silly sed question. And me without my sed book handy. :(
>
> $ echo sed-hates-me
> sed-hates-me
>
> $ echo sed-hates-me | sed 's/me/`whoami`/'
> sed-hates-`whoami`
>
> Doh! Shouldn't this work? I was expecting output like this:
>
> sed-hates-kevin
>
> ...Kevin
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss