亚行壳QUOT;窗口批处理脚本后&QUOT不执行下一行; [英] windows batch script not execute next line after "adb shell"

查看:157
本文介绍了亚行壳QUOT;窗口批处理脚本后&QUOT不执行下一行;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows批处理脚本:

windows batch script:

亚行外壳

回声你好

为什么下一行回声你好没有执行?
任何帮助是鸭preciated。

why the next line "echo hello" not execute ? Any help is Appreciated.

推荐答案

在一个批处理脚本中的下一行previous命令亚行外壳完成后执行。

The next line in a batch script executes after the previous command adb shell has finished.

亚行外壳启动一个交互的shell,它只有你退出shell之后完成。

adb shell starts an interactive shell and it finishes only after you exit the shell.

假设你想要执行回声你好在亚行外壳,把它们放在同一行:

Assuming you want to execute echo hello in the adb shell, put them on the same line:

adb shell echo hello

在这种形式下,亚行外壳不启动一个交互式的外壳,但工作在批处理模式下,运行命令,然后退出。

In this form, adb shell doesn't start an interactive shell but operates in batch mode, running the command and then exiting.

任何方法可以强制下一个命令执行甚至是pre命令没有完成?

any method can force next command execute even the pre command not finished ?

使用启动在后台启动一个程序,例如。

Use start to launch a program in the background, e.g.

start /b adb shell
echo hello

这篇关于亚行壳QUOT;窗口批处理脚本后&QUOT不执行下一行;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆