http://www.ciscoarmenia.com/
A shell script is a computer program designed to be run by the Unix shell, a command line interpreter. The various dialects of
shell scripts are considered to be scripting languages.
Typical operations performed by shell scripts include file manipulation, program execution, and printing text.
From ping's man page
If ping does not receive any reply packets at all it will exit with code 1. If a packet count and deadline are
both specified, and fewer than count packets are received by the time the deadline has arrived, it will also
exit with code 1. On other error it exits with code 2. Otherwise it exits with code 0. This makes it possible
to use the exit code to see if a host is alive or not.