Create a script using Mac terminal

Scripts save us a lot of time. While scripts are running and doing the work we would have had to do manually, we can drink coffee or talk or just chill! 😃 Here is how you can create a simple script in mac terminal.

Run the following in the terminal:

Paste the following or your own private script:

echo "Hello, world!"

Hit

Ctrl + wq

Run the following:

sudo chmod 700 myScript.sh

Run the script by:

./myScript.sh

My personal scripts run a bunch of git commands all in one script or build an app with different configurations etc. I also have scripts that compile and build an application or more 😉

Happy scripting guys and girls!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s