[LUGOS] BASH programming!!!

Novak Dusan ITICMA d.novak at iskratel.si
Tue May 27 13:59:35 CEST 2003


#!/bin/bash
if ! echo $PATH | /bin/grep -q "/bla" ; then
    echo Not set	
    PATH=$PATH:/home/branko/bla
    export PATH
    echo $PATH
fi

zakaj to ne export a poti...(PATH)???

-----Original Message-----
From: Stojan Rancic [mailto:stojan at aufbix.org]
Sent: Tuesday, May 27, 2003 12:41 PM
To: lugos-list at lugos.si
Subject: Re: [LUGOS] BASH programming!!!


Hojla Novak,

Tuesday, May 27, 2003, 12:36:48 PM, si napisal(a):


> še eno vprašanje,
> 1.ko vpišem nekaj v .bash_profile, moram potem restartat consolo...ima kdo
> idejo...

# . .bash_profile

, in se bodo uveljavile spremembe v trenutni konzoli.

> 2. S katerim ukazom lahko preverim če že imam nekaj v filu...(grep) kateri
> switc preverja besede znotraj vrstice?

grep to pocne brez switchev ;)

# grep beseda datoteka

bo izpisalo vse vrstice, v katerih se nahaja beseda v tej datoteki.



                              GreetZ, Stojan
---------------
Alex, I'll take "Things Only I Know" for $1000. 



More information about the lugos-list mailing list