I have a script that should connect to oracle and run a query.
When I run the script I get the following error.
ORACLE_HOME=/app/oracle/product/10.2.0
export ORACLE_HOME
atm_test.sh: ORACLE_HOME^M: is not an identifier
My script looks like this.
ORACLE_HOME=/app/oracle/product/10.2.0; export ORACLE_HOME
ORACLE_SID=sid; export ORACLE_SID
PATH=/usr/bin:/usr/sfw/bin:/app/oracle/product/10.2.0/bin; export PATH
...
In the shell when I echo $ORACLE_HOME it outputs /app/oracle/product/10.2.0
So I don’t know what the issue could be.
Your script has Windows-style line endings. Run it through
dos2unixor a similar tool. (Note that, unlike most filters,dos2unixoverwrites the input file, so be careful.)Are you using Cygwin?