Re: sed hates me

Kezdőlap
Csatolmányok:
Üzenet email-ben
+ (text/plain)
Üzenet törlése
Válasz az üzenetre
Szerző: Mike Garfias
Dátum:  
Címzett: plug-discuss
Tárgy: 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