Check the record count in table (table in oracle)

I have requirement:

1) Check the record count in table (table in oracle)
2) If records exists generate the file for existing records and wait for some time (Go to sleep mode) and
Again check the record count after 10 min.......... (Loop this process if record count >0).
3) Generate touch file once table count is zero.

I need script for above scenario and i am poor in UNIX.
Please try to help me, please send full-length script.

Please mail: .....@gmail.com

Thanks&Regards,
Ashok

(10) Don't post your email address and ask for an email reply. Don't send a private message with a technical question. The forums are for the benefit of all, so all Q&A should take place in the forums.

You can find the rules here: The UNIX and Linux Forums - Forum Rules

Thread closed.