Script to upload the valid file database #!/bin/bash #Purpose:upload custdata file to sales table #version:1.0 v=('/data' 'cust.csv' 'sales' 'cust.ctl') v1="hr" v2="12345" while true do cd ${v[0]} test -f ${v[1]} if [ $? -eq 0 ] then if [ -s ${v[1]} ] then sqlldr $v/$v1 control=${cred[3]} if [ $? -eq 0 ] then mail -s "update success" dbteam@cts.com