sed problem

Todd Zullinger tmz at pobox.com
Wed Apr 19 17:19:19 UTC 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hans Müller wrote:
> I have this sting: "/Linux/update" and I must substitute it to
> "\/Linux\/update" I tryed echo "/Linux/update"|sed "s/\//\\\//g" but
> it fails.  have someone any ideas??

Try this:

$ echo "/Linux/update" | sed 's,/,\\/,g'
\/Linux\/update

- -- 
Todd        OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp
======================================================================
Going to hell when I die would just be redundant.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: When crypto is outlawed bayl bhgynjf jvyy unir cevinpl.

iG0EARECAC0FAkRGcRUmGGh0dHA6Ly93d3cucG9ib3guY29tL350bXovcGdwL3Rt
ei5hc2MACgkQuv+09NZUB1rcgwCeMpRboEs38nP3xnXcl8sz+4LTQuAAoKYY65M6
Kct2XK5ft/pCdvUTkcxE
=97xP
-----END PGP SIGNATURE-----




More information about the users mailing list