Re: sed problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux