Scripting ideas?

Hi All,

How can I script the following logic?

Step 1: Check if the file xyz.txt exists under direcotry test and if the size of the file xyz.txt is greater than 32MB.
Step 2: If the above conditions are true(file exists and size >32 MB), then step 3, otherwise step 4 (file does not exist or size < 32 MB).
Step 3: login into the oracle database as sysdba, drop table xyz_tbl, and run the script test/xyz.sql; exit with status successful.
Step 4: echo "file does not exist", or "invalid file size"; exit with status "failed" and send email to sueyoung@yyy.com.

Can someone help?

Thanks!

this looks like homework? if so, plz read the rulez!

There have been at least two other posts in the past few days looking for almost identical scripts and there are also countless examples of similar scripts on these forums. I am comfortable with calling this homework and closing the thread.