Bash – Hello World

email me

Recommended Reading (click for Amazon link)

 

I used an online interpreter to test the code (as well as OS X). See notes.

Code

#!/bin/bash
echo "Hello, world!"


Output


Notes

Online Interpreter

To run in OS X:

Save as helloworld.sh on the desktop  — the .sh stands for shell, as in a shell script.

— Open a terminal window

— Drag helloworld.sh to terminal window

— Press Return