How to make interactive shell script a automated one?

Hi,
I am new to shell scripting.I have written a very simple shell scipt that asks for the username and password on executing. i.e
echo "Enter username :"
read usrname;
echol "Enter password :";
read passwd;
echo usrname;
echo passwd;

but now I want to make it automatic , such that it will execute non-interactively i.e it wont ask for username and password. These values may be stored into some other file say info.txt which will contain usrname=unix
passwd=1234
and the script will automatically read and place the value , Do i require any other script to read the file? any idea?? please suggest. Thank you.

Hope this helps:

eval "$(awk 'BEGIN {FS="="} /usrname/ { printf "username=%s", $2 } ' info.txt)"
eval "$(awk 'BEGIN {FS="="} /passwd/ { printf "password=%s", $2 } ' info.txt)"

Or why not just include the file in the script if its just a series of variable assignments:

echo "hello world"
. info.txt
echo "Username: $usrname"
echo "Password: $passwd"

The 2nd one is better for me I think Thanks a lot for help.