#!/bin/sh error_fn() { echo "ERROR: $1" exit 1 } if [ $# -lt 2 ] then error_fn "you need at least 2 arguments " fi echo the first argument was $1 it\'s properties are: ls -l $1 echo the first argument was $2 it\'s properties are: ls -l $2 if [ $? -ne 0 ] then error_fn "could not read the directory: $1" fi if test -e my_file then error_fn "my_file does not exist " fi #