I'm not even sure if bash is the most proper way to achieve this but, I need to, programmatically, switch between opened applications on OS X.
I'm thinking about doing a bash program to execute "cmd+tab".
I'm unable to find this on a regular search, so, perhaps someone can point me some directions here?
Best How To :
You can use Applescript to achieve this.
To focus on a specific application:
tell application "Finder" to activate
And to emulate an actual Cmd+Tab input:
tell application "System Events"
key down command
key up command
Applescript files (*.scpt) can be run through the command line with