首页 > 代码库 > 贴一段shell代码

贴一段shell代码

好久没用shell了,呵呵

#!/usr/bin/env bashCOUNTER=1while [  $COUNTER -lt 1000 ];doecho The counter is $COUNTER  cat<<EOF >>tmp.sqlINSERT INTO "wcdata" VALUES(`(printf "%03d"  $COUNTER)`,0.00,0.00,0.00183,85.47943,4773267.7216,-10669.18);EOFecho The counter is $COUNTER  cat<<EOF >>tmp.sqlINSERT INTO "wcxx" VALUES(`(printf "%03d"  $COUNTER)`,同步输出,模拟小电压,0.5V,模拟小电压,0.5V,‘‘,2015-01-23-19-52-36);EOFlet COUNTER=COUNTER+1done

 

贴一段shell代码