export is not working on command prompt
Posted: Thu Aug 26, 2010 6:47 pm
Hi,
The command export is working inside a shell script, but when I type it at the command prompt / terminal it doesn't work. "export: The command not found" error is displayed instead.
I tried this:
cat test.sh
But when I type it at the command prompt:
I get the "the command not found" error.
is also working fine.
I tried it before on my RHEL system and it was working. I have checked the $PATH variable also it is okay. What could be the problem?
The command export is working inside a shell script, but when I type it at the command prompt / terminal it doesn't work. "export: The command not found" error is displayed instead.
I tried this:
cat test.sh
Code: Select all
abc=123
export abc
echo "Exit status of export abc: $?"Code: Select all
# bash test.sh
Exit status of export abc: 0Code: Select all
# export abc=123Code: Select all
man exportI tried it before on my RHEL system and it was working. I have checked the $PATH variable also it is okay. What could be the problem?