
Is there a way to disable this behaviour completely? I already found the setting in the Terminal preferences to close the window after the script has finished, but it's still annoying to have the Terminal window pop up for a second. I also tried assigning the Terminal app to another virtual desktop in the Spaces settings in an attempt to move it out of sight, but then it will just first switch to that desktop before running the script. (EDIT: this behaviour was actually caused by a bug in my script, see below) app directory, which solves the problem of the superfluous terminal window, but has some other issues (for example OS X seems to treat each resulting iTerm window as a separate app, cluttering my dock). bin/bash My example bash script echo 'Hello World' The first line contains a shebang followed by the path to the shell, in this case bash - this acts as an interpreter directive and ensures that the script is executed under the correct shell. A collection of Mac OS X shell scripts, mostly as published in articles on my blog - GitHub - liyanage/macosx-shell-scripts: A collection of Mac OS X shell scripts, mostly as published in articles.

The terminal window doesn't appear if I run the script directly from another terminal.Ī workaround I found was to wrap the script in an. A shell script is an ASCII text file containing one or more commands. from Finder, or as a keyboard shortcut from BetterTouchTool). The problem is that OS X insists to open a Terminal window for any shell script you execute through the GUI (i.e.

I'm trying to set up a few keyboard shortcuts that open specific iTerm sessions, which I was able to do with BetterTouchTool and a bit of AppleScript magic.
