我陷入了一个脚本,它有一个if循环和一个for循环,PFB代码我在行中得到语法错误:`(('意外
if [ $? = 0 ]; then
for (( count=0; count<=number; count++ ))
echo " statement"
done
else
echo " Else statement executed "
fi
任何人都可以帮我这个......?
答案 0 :(得分:0)
您缺少完成和 fi
#!/bin/bash
number=4
if [ $? = 0 ]; then
for (( count=0; count<=number; count++ ))
do
echo "df"
done
fi