Connecting to Oracle from Shell..What Am I doing Wrong

I have the following code in my shell script.

. /apps/oracli/xxxxx/xxxx/oraEnv.9.2.0
sqlplus -s $DB_USER/$DB_PWD@$DB_NAME > xx.html <<EOF

I am passing DBuser and DBname from a config file and the password from user.

Config File :

export DB_USER=xxx;
export DB_NAME=xxx;

I am getting the usual error

ERROR:
ORA-01017: invalid username/password; logon denied

SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon> ::= <username>[/<password>][@<connect_string>] | /
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon> ::= <username>[/<password>][@<connect_string>] | /
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

user=xxxx
passwd=xxxx
dbname=xxx
sqlplus -s $user/$passwd@$dbname >test.sql <<END
select * from dual;
END

It works for me,If u still get the error,then use
/oracle/product/<yourversion>/bin/sqlplus -s $user/$passwd@$dbname >test.sql <<END

Regards,
cskumar