【问题标题】:How can i reach as variable of /src last folder in shell script?如何在 shell 脚本中作为 /src last 文件夹的变量?
【发布时间】:2012-09-30 13:14:28
【问题描述】:

这个 sh 脚本位于名为“install.sh”的<project-dir>/w

我想知道我的目录姓氏“bes”在哪里<project-dir>/src/com/seri/bes

 #!bin/bash

我在这一行使用myendpath=${PWD##*/},但变量返回“w”;

myendpath=ls ../src/com/seri/
me="../bin/$myendpath-debug.apk"
adb uninstall com.seri.$myendpath
adb install $me

我怎样才能达到名称价值<project-dir>/src/com/seri/*

【问题讨论】:

    标签: android shell adb ubuntu-12.04 pwd


    【解决方案1】:
    #!bin/sh  
    my1=$(ls ../src/com/seri)
    my2="../bin/$my1-debug.apk"
    adb uninstall com.seri.$my1
    adb install $my2
    

    我做到了.. 使用命令行 android 太有用了

    【讨论】:

      猜你喜欢
      • 2018-09-13
      • 1970-01-01
      • 1970-01-01
      • 2023-03-28
      • 2013-07-05
      • 2014-05-08
      • 2018-07-18
      • 2010-11-13
      • 1970-01-01
      相关资源
      最近更新 更多