0

I have a bash script that is a watchdog for a perl script. It checks to see if the perl script is running if it isn't I want it to start it in a console. To run the perl script directly from a console I use

 usr/bin/xterm -e perl /path/to/file/script.pl

How would I get this to launch within a bash script?

1
  • 3
    Do you mean /usr/bin/xterm? If so, what happens when you add just this exact line to your Bash script? Commented Mar 30, 2012 at 2:18

1 Answer 1

1

Assuming the script is not already running:

#!/bin/bash

while true; do
  /usr/bin/xterm -e perl /path/to/file/script.pl
done
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.