【发布时间】:2018-02-02 21:38:34
【问题描述】:
#!/bin/bash
#!/usr/bin/python
read -p "Execute script:(y/n) " response
if [ "$response" = "y" ]; then
echo -e "\n\nLoading....\n\n"
for ((x = 0; x<5; x++))
do
echo -e "Open $x terminal\n\n"
open -a Terminal.app
done
fi
这只会打开一个新的终端窗口。如何打开 10 个新的终端窗口?
【问题讨论】:
-
我认为每个文件只能有一个 shebang (
#!),因此您的#!/usr/bin/python是不必要/被忽略的。
标签: linux bash macos shell unix