[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 Fri, May 24, 2013 at 11:36:09AM +0200, benjamin22@gmx.de wrote:

> #!/bin/bash
> env > /root/env.txt 2>/root/env.fehler.txt
> if egrep "DEBOOTSTRAP_DIR=/tmp/usr/share/debootstrap" /root/env.txt; then
>         echo 'ok ist vorhanden'    
> else
>         echo 'nicht vorhanden ich erstelle es :'
>         export "DEBOOTSTRAP_DIR=/tmp/usr/share/debootstrap"
> fi

Dein Script wird in einer neuen Shell ausgeführt, darin wird DEBOOTSTRAP_DIR
auch gesetzt, davon bekommt die aufrufende Shell nur leider nicht mit.

Wenn Du das in der Form auch wirklich in der aufrufenden Shell brauchst,
mußt Du das Script mit source oder . aufrufen.

Gruß
Ulf


Reply to: