bashxterm

BASH script to open xterm and continue executing


I want to open a xterm with a ping scan how ever I don't want the script to halt until the xterm is closed.

I'm using

    xterm -hold -e ping localhost

The script looks like

    #!/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"

Solution

  • just put it in the background with &:

    xterm -hold -e ping localhost &