Terminal – Create Entry in /Applications Folder to Run Command

filesystemterminal

I would like to have an item in the /Applications folder that will open a new terminal window and run a specific command inside. How can I create this?

Best Answer

  1. Create a new text file starting by #!/bin/bash and followed by your command

    #!/bin/bash
    
    echo 'Hello world'
    
  2. Save with .command or .tool as extension like myEchoCommand.command

  3. Set execute right on this file with chmod command.
  4. You just have to double-click this newly created file, Terminal will open and execute it's content.