This might help you.

http://www.tc.umn.edu/~hause011/code/exp-imp-db.ksh