Posted on 2010-08-12 11:35
kongkongzi 阅读(217)
评论(0) 编辑 收藏 引用 所属分类:
linux
#!/bin/bash
i=1 # define a variable. Note: No spaces.
while
true
do
if [ $i -eq 1 ] # "[" and "]" is for testing. $i is the reference value. Note: Spaces.
then
echo "i is equal to 1."
i=0
else
echo "i is not equal to 1."
i=1
fi
sleep 1s
done