 |
|
Kaak
|
|
we are working with shell scripts, in particular a reworking of setpath...
I need to change this:
if [ -z $PATH ]; then
PATH=$newpath
elif [ $PATH="." ] || [ $PATH = ".." ]; then
PATH=$newpath:.
elif [ $PATH=":" ]; then
PATH=$newpath:
elif [ ${PATH:${#PATH}-2} = ":." ]; then
PATH={PATH/%":."/:$newpath:.}
elif [ ${PATH:${#PATH}-1} = ":" ]; then
PATH=${PATH/%":"/:newpath:.}
else
PATH=$PATH:$newpath
fi
into a loop....
can anyone help???
|
|
|  |
 |
|
Kaak
|
|
ha, unfortunately, that isn't an option, i'm stuck with using the bash shell
|
|
|  |
 |
|
Kaak
|
|
okay, so maybe a loop isn't necessary, i just need to simplify it....anyone???
|
|
|  |
All times are GMT. The time now is 05:27. Apolyton Time is 00:27. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|