I'd like to run a bash file on a darwin via:
open -n -a Terminal --args bashfile.sh
The bash file itself looks like:
#! /bin/sh <application> <arguments>
It works as expected, but is there a way to close the terminal window when the process is done?
I already tried
exit 0; but without success.
In the Terminal's preferences (Terminal > Preferences > Settings > Shell) you can set the 'When the shell exists' flag to
close the window if the shell exited cleanly. If nothing went wrong, this closes the terminal window afterwards, but not the application as such.