Terminal Bash Dock – Create Extra Dock Item That Runs a Bash Script

bashdockterminal

I currently have the Terminal in my dock. I'd like to have another Terminal shortcut in the dock but with this one it will run a bash script which will do some stuff specific to that shortcut.

No, I cannot use .bash_profile since the original Terminal short cut will source that too.

This is pretty trivial to do in Windows, is it trivial on a Mac also?

Best Answer

You can have files in the Dock, but they have to be the other side of the 'dividing line' from apps.

So a shell script file, with suffix .command, or .tool, could be in the Dock and would launch on a click.

There are other places to have scripts readily accessible in the Mac workspace, of course, such as the Scripts menulet.