#!/bin/sh -u # If the script has one argument, tell whether it is exists and is readable. # Issue an error message unless exactly one command line argument is given. # Redirect all echo error messages to standard error: 1>&2 # The current name of the executing script is in variable $0. # # NOTE: This script fragment is incomplete - it does not follow all # the script guidelines set out in "script_style.txt". # # -IAN! idallen@idallen.ca if [ $# -eq 1 ] ; then if [ -r "$1" ] ; then echo "path $1 is readable" else echo "path $1 is missing, inaccessible, or is not readable" fi else echo 1>&2 "$0: I did not find one path argument, I found $#" fi