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?