Unable to set my PATH variable

Hello All,

Hope you can understand my problem from the below code.

$ cat ~/.profile
PS1=`whoami`@`hostname`':$PWD
$ '
export PATH="$PATH:.:/logarchive/utility/util:/usr/sbin:"
$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/usr/sbin:
$ echo $SHELL
/usr/bin/ksh

Please help me..

Just use..:slight_smile:

PATH="/logarchive/utility/util:/usr/sbin:"

Or like this..

export PATH=$PATH:/logarchive/utility/util:/usr/sbin

or

PATH="/logarchive/utility/util:/usr/sbin" ; export PATH

No luck Pamu.

echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/usr/sbin:
$ cat ~/.profile
PS1=`whoami`@`hostname`':$PWD
$ '
export PATH=$PATH:/logarchive/utility/util:/usr/sbin

What you are trying to achieve...?

My scripts inside /logarchive/utility/util should be used anywhere from my Box

So what's the problem...???

You can call your script from anywhere. Just give the script path.

PATH is not which should be useful here as per my opinion.

Please explain in detail what you want to do...?

Never ever ever put . in your path. It won't work right. It will cause things after it to have errors. Everything in PATH must be an absolute path.

1 Like