[LUGOS] BASH programming!!!

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


sedaj v scriptu deluje...ne vem zakaj naenkrat...
#!/bin/bash
if ! echo $PATH | /bin/grep -q "/bla" ; then
     echo $PATH
     echo Not set        
     PATH=$PATH:/home/branko/bla
     export PATH
     echo $PATH
fi

REZULTAT:

#./bla1
/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:
/root/bin:/usr/java/j2sdk1.4.1_01/bin
Not set
/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:
/root/bin:/usr/java/j2sdk1.4.1_01/bin:/home/branko/bla

#echo $PATH
/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:
/root/bin:/usr/java/j2sdk1.4.1_01/bin

kot je razvidno pa ko podam v konzoli

#echo $PATH

pot naekrat ni več setirana...

ma ne vem kaj je to????

Ima kateri od vas idejo????

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


Hojla Novak,

Tuesday, May 27, 2003, 2:09:39 PM, si napisal(a):


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

Meni ona tvoja skripta lepo dela ;) Katero verzijo bash-a imas ? Tukaj
je 2.05a.0(1)-release. Se output:

ns:~$ ./foo.sh
/usr/bin:/bin:/usr/bin/X11:/usr/games
Not set
/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/branko/bla

in sam skript:

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

                              GreetZ, Stojan
---------------
Don't try to saw sawdust.



More information about the lugos-list mailing list