Step 1. Open your terminal and type following:

# my first unix shell script
echo 'Hello World!' > /path/to-save/

Step 2. Save your writings by pressing Esc then : then w keys.

Step 3. Locate to your file $ cd /path/to-save

Step 4. Type $ vi or $ vim to run your first shell script

It will print Hello World!