Shell 遍历字符串与参数
遍历字符串:
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_inte易做图ces.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_inte易做图ces.txt -U${SQL_USER} -P${SQL_PASSWD} -S${SQL_GOLDEN} < ${SQLFILE} >${TMPFILE}
done
exit 0;
补充:综合编程 , 其他综合 ,