Weird script

I need a script to do the following and have no idea how to do it...can someone help?

I need to start Sql*Plus, load a query, say "unmatched.sql", run the query, then load unmatched.sc and run it, then print the output file that unmatched.sc created...

any help greatly appreciated.

Duckman

From UNIX shell, if you would like to connect to sqlplus
and do some processing, you can go about this way by enclosing the following in a shell script

sqlplus -s user_id/passwd << end-it

set pages 0 feedback off echo off

--run the procedure you want to
@proc_name;

exit;

end-it

Run the above script at the shell command prompt

[Edited by seshagiri on 03-14-2001 at 11:21 AM]

Thanks! It works great! I'm pretty new to unix so I have no idea how that script works. Can someone explain the script line by line to me please? thanks

Duckman