error while using export command

Hi All,

In my script i am using data from oracle table for validation.

 
#!/bin/sh
export UID=dun_ind
export PWD=`getID dun_ind`
fed_ctrl=`sqlplus -s $UID/$PWD@lms  <<END
 set feedback off;
 set heading off;
select sta from controls where sta = 'ABC';
 EXIT;
 END`
 echo $fed_ctrl

initially i have written username & pwd hard-coded. But now i need to export it & has to use it.

I have used export command. But not able to get it. Can someone help me where i am making mistake.

the error is UID=dun_ind: is not an identifier

UID and PWD are system variables which stand for "UserID" and "Print Working Directory"; you should pick definetly other names for your custom variables. Very unlucky pick :wink:

Do an echo on them in your shell and see what is assigned to them currently. UID will have the uid of your current user and is a read only variable.
PWD can be changed, but if you do so, any output like maybe in the prompt/PS1 will be messed up then.