美文网首页
【蜗牛黑板报】ubuntu等类linux环境抓ylog的脚本

【蜗牛黑板报】ubuntu等类linux环境抓ylog的脚本

作者: 技术是神奇的 | 来源:发表于2020-08-06 20:37 被阅读0次

脚本功能: 生成以当天日期命名的文件夹,当时log放置在该文件夹内

cur_dateTime="`date +"%m-%d"`"
echo -e "$cur_dateTime \n"
sudo adb kill-server
sudo adb start-server
adb devices
adb root
adb remount
ylogpath=`adb shell ylogctl rootdir`
echo -e "ylogpath = $ylogpath \n"
if [ ! -d "$cur_dateTime" ]; then
    mkdir $cur_dateTime
fi
cd $cur_dateTime
echo -e "pls input directory \n"
read a
while [ “1” = “1” ]
    do
        if [ ! -d "$a" ]; then
            mkdir $a
            break
        else
            echo -e "file exists,plz input an new directory again!!\n"
            read a
        fi
    done
cd $a
adb pull $ylogpath  .
python analyzer.py```

相关文章

网友评论

      本文标题:【蜗牛黑板报】ubuntu等类linux环境抓ylog的脚本

      本文链接:https://www.haomeiwen.com/subject/zpuqdktx.html