Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass#word : is not an identifier

Status
Not open for further replies.

cmcleod

Programmer
Sep 18, 2001
15
US
We have a shell script that reads in variables ($USRID/$PASSWD@$DBNAME) from a text file. We recently changed the password to contain a special character (#). When the shell script runs that reads the variables it gets a "pass#word : is not an identifier" error and stops. Does anyone know how I can code the # to not error out? Thanks.
 
Hi,

I need a bit more detail information like ..
the format of text file and where is # in that file .. I am not getting exact picture what you are trying to do.

reply back soon to forum.

regards,
Mahesh
 
sh script to read file
################
cat $PARFILE | read MODULE USRID PASSWD DBNAME
export $USRID
export $PASSWD
export $DBNAME

sqlplus -s $USRID/$PASSWD@$DBNAME.world <<EOF >>$UNLOAD_LOG 2>&1
select * from dual;
exit
EOF
################

text file format
################
MODULE USRID PASS#WD DBNAME
################

That is how the text files looks when I get the error. Let me know if you would like to see anything else.
 
For starters, a quick test reveals that the problem you are experiencing is caused by the export $PASSWD command. 1st question - Do you really need to export the variables?

Greg.
 
I am not much of a Unix programmer and did not write this script. I have just been put in charge of finding a solution. Our solution so far has been to remove the special characters. If the export command is not the way to go do you have another suggestion? Thanks.
 
Having another look at the script, the export lines should read ...

export USRID
export PASSWD
export DBNAME

Try that.

Greg.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top