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

Re: mit sed einen Pfad in /usr/sbin/debootstrap ändern indem slashes vorkommen



On Thu, May 23, 2013 at 08:41:18PM +0200, benjamin22@gmx.de wrote:

> ich möchte im prinzip in "/|usr/sbin/debootstrap" ||die
> Zeile||DEBOOTSTRAP_DIR=/usr/share/debootstrap|
> 
> |durch DEBOOTSTRAP_DIR=/tmp/usr/share/debootstrap|

[...]

> sed 's/"DEBOOTSTRAP_DIR=/usr/share/debootstrap"/"DEBOOTSTRAP_DIR=/tmp/usr/share/debootstrap"/g'

Statt s/a/b/ kannst Du auch einen anderen Trenner verwenden, also

sed 's;DEBOOTSTRAP_DIR=/usr/share/debootstrap;DEBOOTSTRAP_DIR=/tmp/usr/share/debootstrap;g'

sonst mußt Du die / durch einen vorgestellten \ escapen:

sed 's/DEBOOTSTRAP_DIR=\/usr\/share\/debootstrap/DEBOOTSTRAP_DIR=\/tmp\/usr\/share\/debootstrap/g'

Gruß
Ulf


Reply to: