add ( script : template_loop.sh)
This commit is contained in:
parent
355daa739e
commit
135cb1b56a
25
03.template/template_loop.sh
Normal file
25
03.template/template_loop.sh
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#/bin/sh
|
||||||
|
|
||||||
|
### About this script
|
||||||
|
# A simple loop example to use
|
||||||
|
|
||||||
|
loop_cnt=0
|
||||||
|
final_cnt=500
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
loop_cnt=$(($loop_cnt))
|
||||||
|
echo "------------------------------------"
|
||||||
|
echo "Loop Index : $loop_cnt"
|
||||||
|
|
||||||
|
# todo [start]
|
||||||
|
|
||||||
|
# todo [end]
|
||||||
|
|
||||||
|
if [ $loop_cnt -eq $final_cnt ];then
|
||||||
|
echo "Complete execute the script, exit ..."
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
@ -14,3 +14,6 @@
|
|||||||
|
|
||||||
### nicsensor
|
### nicsensor
|
||||||
- M7服务器BMC读取网卡传感器 :[nicsensor.sh](./02.nicsensor/nicsensor.sh)
|
- M7服务器BMC读取网卡传感器 :[nicsensor.sh](./02.nicsensor/nicsensor.sh)
|
||||||
|
|
||||||
|
### 脚本模板
|
||||||
|
- 简单的循环模板 :[template_loop.sh](./03.template/template_loop.sh)
|
||||||
Loading…
Reference in New Issue
Block a user