How to create a custom command for the terminal? Every time I make a new webpage, I do the following commands in the terminal.

touch index.html
mkdir stylesheets
mkdir javascripts
mkdir images
mkdir sass
open index.html -a sublime\ text


I wish to automate this. like I wish I could type 

init newProject


and all the above commands would execute on its own.

Is it possible?
You can do it with various methods, here's the easiest one in my opinion:

Paste this line in your ~/.bash_profile

function initProject { touch index.html &amp;&amp; mkdir stylesheets &amp;&amp; mkdir javascripts &amp;&amp; mkdir images &amp;&amp; mkdir sass &amp;&amp; open index.html -a sublime\ text; };


Save it and execute source ~/.bash_profile

Right now you can type initProject to get what you want.