Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create a shortcut of sorts to a Perl script, by saving a terminal command which launches the script to a .command file. The script is interactive, and allows for the user to interface with it via the command line. However, when I launch the .command file, the script runs, then terminates after it finishes loading (the menu options are shown before logout and [process completed]).

Is there any way to circumvent the automatic logout and script termination?

share|improve this question
If you launch a terminal with a script in it that reads from stdin, it should wait for input from the user, not terminate immediately. Can you give the contents of the "shortcut of sorts" that launches the terminal and perl script? – alexis Feb 1 '13 at 0:06
up vote 1 down vote accepted

What about using the screen command?

share|improve this answer
I hadn't thought of that. Thanks! – Jules Feb 1 '13 at 3:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.