sed problem

Levin Fritz levinfritz at
Wed Apr 19 17:17:13 UTC 2006

> 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??

Use single quotes:
  echo "/Linux/update"|sed 's/\//\\\//g'
With double quotes, bash will turn your \\ into \

More information about the users mailing list