Terminal User Guide

Shell scripts must be executable files in order to run. You can use the chmod command to indicate that the text file is executable (that is, its contents can be run as a shell script).

  1. In the Terminal app on your Mac, use the cd command to move into the directory that contains the file you want to make executable. For example:

  2. Enter the chmod command. For example:

    % chmod 755 YourScriptName.sh
Command

After making the shell script file executable, you can run it by entering its pathname. For example:

The Mac command line offers a faster, easier way to accomplish many tasks. It's also the medium for many commands that aren't accessible using the GUI. The Mac OS X Command Line is a clear, concise, tutorial-style introduction to all the major functionality provided by the command line. Terminal (in your /Applications/Utilities folder) is the default gateway to that command line on a Mac. With it, instead of pointing and clicking, you type your commands and your Mac does your. Is there a command I can run from the command line in OS X to get the current CPU temperature and/or the fan speed(s)? To be more specific, I'd like to be able to get the same info available in the iStat widget under the Fans and Temps tabs on the command line. I'd like to be able to find these values at the command line so it could be scripted and plugged into a monitoring setup on my Mac. Press C During Startup: Booting from a CD? You can hold down the C key on your keyboard to. The command line is not only powerful, it can also be dangerous. Learn how to use commands for deleting files and folders correctly to make sure your time with Terminal is a productivity godsend.

or

% cd ~/Documents/Dev/ % ./YourScriptName.sh

Command Line Mac Os X Tutorial

See alsoAbout shell scripts in Terminal on MacApple Support article: Use zsh as the default shell on your MacScript management with launchd in Terminal on Macchmod command man pagecd command man page