遍历字符串:
for line in $Table_List
do
echo $Table_List
echo $Table_List >> ${SYB_LOG}/log.txt
echo "TRUNCATE TABLE $Table_List" > ${SQLFILE}
echo "go" >> ${SQLFILE}
$SYBASE/OCS-15_0/bin/isql -I/opt/muni/HNWEnv/HNW_interfaces.txt -U${SQL_USER} -P${SQL_PASSWD} -S${SQL_GOLDEN} < ${SQLFILE} >${TMPFILE}
done
遍历参数:
for line in $*
do
echo "TRUNCATE TABLE $line" > ${SQLFILE}
echo "go" >> ${SQLFILE}
$SYBASE/OCS-15_0/bin/isql -I/opt/muni/HNWEnv/HNW_interfaces.txt -U${SQL_USER} -P${SQL_PASSWD} -S${SQL_GOLDEN} < ${SQLFILE} >${TMPFILE}
done
exit 0;