shell脚本运行报错

运行环境:在8909平台运行android5.1

报错: syntax error: 'while' unmatched

原因:windows和ubuntu写出的脚本的换行符不同;具体可以参考http://blog.csdn.net/wjcquking/article/details/6634504

            因此需要在ubuntu环境下编写,在使用adb命令push到终端去执行

代码片段:

#!/bin/bash
cat /d/mdp/stat
people[4]=jijianwen
echo ${people[@]}
while [ 1 ]
do
    cat /d/mdp/stat
done


 
 

猜你喜欢

转载自blog.csdn.net/huifeidedabian/article/details/76521828
今日推荐