shell 遍历安装apk

 # bin/bash!

 current_dir=$(pwd)

echo "当前的路径是:$current_dir"

# 第一种写法.

for file in $(ls ./);

do

if [ -f $file ] && [[ $file == *".apk" ]]

then

   _path="$current_dir/$file"

    echo "-----adb install -r -d -----$_path"

    adb install -r -d $_path

    echo "-----adb install end"

else

    echo $file is not file .

fi

done

你可能感兴趣的:(ssh)