Re: sed hates me

Página superior
Adjuntos:
Obtener este mensaje como un correo
+ (text/plain)
Eliminar este mensaje
Responder a este mensaje
Autor: Mike Garfias
Fecha:  
A: plug-discuss
Asunto: 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