Quote:
Originally Posted by
Don Cragun
I don't know why, but having the extension
.sh on your filename creates the problem you're having. Get rid of that extension and get rid of your problem.
When I remove the extension, the file icon changes from the Atom text editor icon to the terminal icon. The script does work as expected now. I wonder if MacOS reads the first line of a file that doesn't have an extension to see what to open the file with.
Quote:
Originally Posted by
Don Cragun
Are we having fun yet?
I'm having allot more fun now than I was with this yesterday.
On the issue of the window not closing when the script completes, if you go to
Terminal > Preferences > Shell, there is a menu in the middle of the window called
when the shell exits .
There are three options on this menu,
close the window
close if the shell exited cleanly
don't close the window
mine was set to
don't close the window
There are certainly cases where I would prefer to have the window stay open when the script has finished and I usually add a
read statement to the end if this is the case. I'm not really sure it makes sense for that to be a global behavior since I can't see that I would want the same behavior in every script. It would be nice if
exit had some options so you could specify this on a script by script basis.
There are also options in the
Shell preference pane to indicate situations where
ask before closing is implemented, in case that is of interest to anyone.
Thanks again,
LMHmedchem