Remember Remember

miércoles, 13 de mayo de 2009

Escaping quotes in bash

A common problem I have.
The solution is (from here):

To single quotes work you need to break out of the single quoted string then escape your single quote. Like so:

sed -e 's/'\''a/b/g'

Because \' is not inside of single quotes the single-quote is properly escaped and the output is as we’d expect:

3 comentarios:

  • Well, well, well, if it isn't the very clever and inspiring fella I found several years ago when we were both freshmen, Camilo Andrés Jiménez. Quite casually I found an article of yours, and afterwards I searched for your name in google, so here I am. I didn't know you were in the States.

    Warm regards from your old friend, David López.

    De Anonymous Anónimo, A las 14 de mayo de 2009, 17:51  

  • Hey David!.

    Long time, no see. I think the last time was in Mary Luz' party, wasn't it?

    So, yeah. I came to the states to get a PhD (it's gonna be 10 months now). I got bored of the real life and wanted to continue in the academic bubble.

    Nice to hear from you!, are you still into software development?

    De Blogger Camilo, A las 14 de mayo de 2009, 18:21  

  • I was precisely remembering about the great Rafael Escalona, one thought led to another, and then I remembered about the old Camilo Jiménez, so five minutes ago I found my way of coming back here.

    About the software development, since Mary's party sometimes I dialed your mobile for making you work proposals but I received no answer, though!

    Real life can be boring sometimes, and it happened exactly the same to me. However, getting in and out, alternating between the "high academic spheres" and the "vale of tears" can be one of the best mixes ever.

    Well done.

    D.

    De Anonymous Anónimo, A las 17 de mayo de 2009, 9:46  

Publicar un comentario

Suscribirse a Enviar comentarios [Atom]



<< Inicio