Not Able to Set the path

Hi,

I want to set the path for my application so I am setting the path as below --

PATH=${PATH}:.:/envs/mldev/tools:/envs/mldev/common/tools:${HOME}:/bin/p4v:/usr/j2se:/usr/j2se/bin:/usr/j2se/lib

or

PATH="\
/usr/bin:\
/usr/sbin:\
/usr/dt/bin:\
/usr/bin/X11:\
/envs/mldev/tools:\
/usr/j2se:\
/usr/j2se/bin:\
/usr/j2se/lib:\
/envs/mldev/common/tools:\
/bin/p4v:\
${HOME}:\
${PATH}\
"
export PATH

but when I am trying to see these path using the set command,I am not able to see it.It is showing the default path--

PATH=/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/bin:/usr/ucb

So can any1 tell me what is going wrong and how can I set the path.. :confused:

Thanks in Advance ...

To change PATH for all users - you would make the change to /etc/profile

To change the PATH for one user - you would make the change to the account's .profile in that account's home directory.

Get rid of that '.' in the path. It is a security risk. Especially when you have it as the first entry in the path.

Adding paths to PATH (the global varaible where the system searches for commands)

For sh, ksh, bash shell add this line to your .profile file \(in your home directory\):
PATH=$PATH:/usr/local/bin:/usr/ccs/bin
export PATH

For csh add this line to your .cshrc file:
set path = \($path /usr/local/bin\)

For tcsh add the same line to your .tcshrc file:
set path = \($path /usr/local/bin\)

I tried everything which you mentioned ( for all users as well as for one user) but I am not able to set the required path..
I am giving the o/p of both

1)After modifying in /etc/profile

PATH=$PATH:/envs/mldev/tools:/envs/mldev/common/tools:/home/Emerson:/software/Perforce:/usr/j2se:/usr/j2se/bin:/usr/j2se/lib
export PATH

then output is :
# pwd
/
# echo $PATH
/usr/sbin:/usr/bin
# env | grep PATH
PATH=/usr/sbin:/usr/bin

2)I set the path in .profile in my home dir
# pwd
/home/user1
in .profile,I add the required path(in bold )

PATH=/usr/bin:/usr/ucb:/etc:.
PATH=$PATH:/envs/mldev/tools:/envs/mldev/common/tools:/home/Emerson:/software/Perforce:/usr/j2se:/usr/j2se/bin:/usr/j2se/lib
export PATH

and when I use
# echo $PATH
/usr/sbin:/usr/bin

I am surprised why path is not being set ?????
Can any1 Please help me to fix it..

One more thing How can I check whether export keyword is working or not??

Thanks in advance..

try EDITOR=vi;export EDITOR
And are you trying these on the console itself or using a ssh connection?

In which Shell U r working...???
o/p of echo $SHELL ......?????

# echo $SHELL
/bin/sh

# echo $SHELL
/bin/sh

If you've made a change to .profile or /etc/profile, your current shell will not realize those changes automatically...