如何在Mac中运行.bash文件?
要使其在单击时可执行,请创建一个.command文件 拥有 给定chmode+x对它的权限 但似乎有点不对劲,代码没有被执行 我的目标是在双击时创建一个批处理/bash文件,它应该打开终端并执行两个或更多命令。Shebang以如何在Mac中运行.bash文件?,bash,macos,Bash,Macos,要使其在单击时可执行,请创建一个.command文件 拥有 给定chmode+x对它的权限 但似乎有点不对劲,代码没有被执行 我的目标是在双击时创建一个批处理/bash文件,它应该打开终端并执行两个或更多命令。Shebang以#开始不是# I want to execute Path : "/Users/Trans/Downloads/solr-6.1.0" Command: "bin/solr start -p 8983" and Path : " /Users/Trans/Downloa
#开始代码>不是#代码>
I want to execute
Path : "/Users/Trans/Downloads/solr-6.1.0"
Command: "bin/solr start -p 8983"
and
Path : " /Users/Trans/Downloads/apache-activemq-5.12.0/bin"
Command: "./activemq console"
!#/bin/bash
"/Users/Trans/Downloads/solr-6.1.0" bin/solr start -p 8983
"/Users/Trans/Downloads/apache-activemq-5.12.0/bin" ./activemq console
#!/bin/bash
# verbose mode ( or -v in shebang )
set -v
cd "/Users/Trans/Downloads/solr-6.1.0" && bin/solr start -p 8983
echo "press a key to continue"
read -n1
cd "/Users/Trans/Downloads/apache-activemq-5.12.0/bin" && ./activemq console
echo "press a key to continue"
read -n1