[LUGOS] BASH programming!!!

Novak Dusan ITICMA d.novak at iskratel.si
Tue May 27 14:09:39 CEST 2003


ni problem da mi ne grepa bla-ja...
izvrši se 

echo Not set        
>     PATH=$PATH:/home/branko/bla
>     export PATH
>     echo $PATH

samo poti pa ne exportira...da ga tepeš...

hvala že vnaprej


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


Hojla Novak,

Tuesday, May 27, 2003, 1:59:35 PM, si napisal(a):


> #!/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)???

Jaz bi se tega malce drugace lotil oz. z drugacnim pogojem:

if [ `echo $PATH|grep -q "/bla" |wc -l` -eq 0 ]; then
  echo Not Set
  ...
fi



                              GreetZ, Stojan
---------------
Clean mind, clean body:  take your pick.



More information about the lugos-list mailing list