I am encountering a strange problem with my 64bit Ubuntu - on the export command.
Basically, I have got a VM installation on Ubuntu on my Win7, and I am trying to pass commands from my windows to my VM installation using a custom (given by client) software.
So, on my VM, when I do:
export foo=bar
echo $foo
everything works as expected.
However, when I do the same through the custom software (which basically passes the linux command as a string to the bash shell), I get:
export: command not found
I tried looking at the shell (using the custom software), using:
echo $SHELL>shell.txt
and I get /bin/bash which is expected and I still get the export: command not found error.
I was wondering if anyone had seen this error before?
Follow These step to Remove " bash export command not found." Terminal open error fix>>>>>>
open terminal and type : root@someone:~# nano ~/.bashrc
After Loading nano: remove the all 'export PATH = ...........................' lines and press ctrl+o to save file and press ctrl+e to exit.
Now the Terminal opening error will be fixed.........
Are you certain that the software (and not yourself, since your test actually only shows the shell used as default for your user) uses /bin/bash ?
Probably because it's trying to execute "export" as an external command, and it's a shell internal.
if u cant use " export " cmd
then Just use:
setenv path /dir
like this
setenv ORACLE_HOME /data/u01/apps/oracle/11.2.0.3.0
change from bash to sh scripting, make my script work.
If you are using C shell -
setenv PATH $PATH":/home/tmp"
SHELL
is an environment variable, and so it's not the most reliable for what you're trying to figure out. If your tool is using a shell which doesn't set it, it will retain its old value.
Use ps
to figure out what's really going on.
Source: Stackoverflow.com