BASH脚本打开xterm并继续执行
问题描述:
我想用ping扫描打开一个xterm,我不希望脚本在xterm关闭之前暂停。BASH脚本打开xterm并继续执行
我使用
xterm -hold -e ping localhost
脚本看起来像
#!/bin/bash
echo "hello"
xterm -hold -e ping localhost
echo "the script did not halt"
echo "see the script is going and xterm is running at the same time"
答
只是把它的背景&
:
xterm -hold -e ping localhost &
谢谢你的。很棒! – theloosegoos