How do I get a Mac ".command" file to automatically quit after running a shell script?
Posted
by LOlliffe
on Stack Overflow
See other posts from Stack Overflow
or by LOlliffe
Published on 2010-04-02T09:33:56Z
Indexed on
2010/04/19
18:33 UTC
Read the original article
Hit count: 313
In my shell script, my last lines are:
...
echo "$l" done
done
exit
I have Terminal preference set to "When the shell exits: Close the window". In all other cases, when I type "exit" or "logout", in Terminal, the window closes, but for this ".command" file (I can double-click on my shell script file, and the script runs), instead of closing the window, while the file's code says "exit", what shows on the screen is:
...
$l done
logout
[Process completed]
...and the window remains open. Does anyone know how to get a shell script to run, and then just automatically quit the Terminal window on completion?
Thanks!
© Stack Overflow or respective owner