Password test!!!

Hi Friends,

I need a sample script in shell, which should solve my criteria

1.Here this is the main step the password for the DB is not hardcoded in the script we are encrypting the password and putting that in some
config file from there it is taken the username and password and using the credentials it will connect to sqlplus.
2.it should connect to sqlplus.
3.As this is only a test it should connect and ping me back with test sucessfull connected to sqlplus message in O/P file.

i can explain the senario of the config file.
Preveusly we need to have config file to which all the scripts get connected and used the credentials which are hardcoded in that config file,
but we need to change that config, like there the password wnt be hardcoded any more it will filled by username/subpassword_prgrm(function).
and the subpassword programe is in the central sever which will be pinged by the given function.

i hope you understood my requirment.

Advance Thanks.