How to execute a .command file using Terminal?

33,735

If you want to execute it as if it was double-clicked in the Finder, you can use open foo.command. This will spawn a new Terminal window. If you want to execute it "inline", as it were, you can just use ./foo.command, as .command files must have the exec bit set in order to function.

Share:
33,735
Jack Humphries
Author by

Jack Humphries

Updated on August 03, 2022

Comments

  • Jack Humphries
    Jack Humphries over 1 year

    Once I navigate to a certain directory that has a .command file in it, how do I execute that file using Terminal?