Listing 2. functions File is_installed() { PROGRAM=$1 PATHNAME=$( type $PROGRAM 2> /dev/null ) if [ -z "$PATHNAME" ]; then echo "cannot locate $PROGRAM in path" exit 1 fi }