简体   繁体   English

从bash脚本运行可执行文件

[英]Running an executable from bash script

My apologies if the question is naive. 我很抱歉这个问题很幼稚。

Is it possible to run a few lines in a bash script then execute a dos batch file and a dos executable file, after completing the execution of the batch file and executable file, continue executing the rest of the lines in the bash script? 是否可以在bash脚本中运行几行,然后执行dos批处理文件和dos可执行文件,完成批处理文件和可执行文件的执行后,继续执行bash脚本中的其余行?

Can I do this using dosemu ? 我可以使用dosemu吗?

A bash script will always finish the script after completion of any called script or executable. bash脚本将在完成任何调用的脚本或可执行文件后始终完成脚本。 example: 例:

@echo off
echo hello
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
echo hope you had fun browsing the web!
pause

This will always echo the last line of code as soon as firefox is closed. 一旦关闭Firefox,它将始终回显最后一行代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM