Tuesday, July 3, 2007

a unix shell test

if I have the following entries in the /root/.bashrc:
export PATH=/opt/ibm/java2-i386-50/bin;$PATH:/wmj
then run . /root/.bashrc
-bash: /opt/ibm/java2-i386-50/bin:/wmj: No such file or directory
why I will got the following error
[root@localhost bin]# ls -al /opt/IBM/WPS/profiles/ccmdb/bin
-bash: ls: command not found
Answer: the typerr ; before the $PATH should be changed to : under unix to delimiter each individual path. the typerr cause the system environment $PATH to be /opt/ibm/java2-i386-50/bin, since ls is not under /opt/ibm/java2-i386-50/bin, the error is raised.

No comments: