BASH 脚本以打开 xterm 并继续执行



我想用ping扫描打开一个xterm,但我不希望脚本在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 &

最新更新