Hello World Shell Script

Using the directions from http://www.freeos.com/guides/lsst/ch02sec01.html you can easily put together a quick ‘Hello World’ shell script. What’s shell? It is software that allows interaction between users and the OS (read more at http://en.wikipedia.org/wiki/Shell_(computing)). In general the commands you run at the command line are available to use in a shell script.
#
#Filename: hello.sh
#Programmer: PFP
#Birthdate: 2010-05-10
#Notes: Hello world script.
#
clear
echo "Hello World"

You can enter these few lines by using vi or any other editor on your Linux machine. Be sure to set the file as executable by running chmod 755 hello.sh from the command line.  To execute the script you simply type ./hello.sh at the command line.

Leave a comment