Mailinglist Archive: opensuse-de (4027 mails)

< Previous Next >
Re: $PATH
  • From: David Haller <david@xxxxxxxxxx>
  • Date: Tue, 27 Apr 2004 19:38:22 +0200
  • Message-id: <20040427173822.GA4834@xxxxxxxxxxxxxxxxxx>
Hallo,

Am Tue, 27 Apr 2004, Marcus Habermehl schrieb:
>Am Mo, 2004-04-26 um 21.13 schrieb David Haller:
>> Am Mon, 26 Apr 2004, Marcus Habermehl schrieb:
>> >Vielleicht sollte ich doch wieder anfangen, die Dateien _komplett_ durch
>> >zugucken und nicht mit grep arbeiten. :-(
>>
>> grep -10 PATH /etc/profile
>
>Äh, funktioniert bei mir nicht. Wenn das eine Variante von
>
>grep -C 10 PATH /etc/profile
>
>sein soll, dann funktioniert beides nicht. Außer ich verstehe den
>Hilfe-Text falsch.

-B, --before-context=NUM print NUM lines of leading context
-A, --after-context=NUM print NUM lines of trailing context
-NUM same as both -B NUM and -A NUM
-C, --context same as -2

Noch Fragen?

>> ==== Alternativ ====
>> cat <<'EOF' >> /etc/profile.local
>>
>> PATH="$PATH:/mein/neuer/pfad/bin"
>> export PATH
>> EOF
>> ====
>>
>> Beachte die "''" beim 'EOF'.
>
>Auch eine Lösung. Wäre der echo Befehl aber nicht einfacher?

Nein.

>Ich habe es so gelöst:
>
>mv /etc/profile /etc/profile.tmp
>cat /etc/profile.tmp | sed '/openwin/ a\ /opt/xfce4/bin
>\\' > /etc/profile
>rm /etc/bash.bashrc.tmp /etc/profile.tmp

Schlecht. Dazu ist doch gerade die profile.local da.

-dnh

--
If you haven't got time to RTFM, you haven't got time to whine on this
mailing list.

< Previous Next >
Follow Ups