#!/bin/sh ROOTPATH=~/mysh/ TARGETPATH=$ROOTPATH$1 if [ -d "$TARGETPATH" ]; then echo "Listing contents of $TARGETPATH..." ls -al $TARGETPATH elif [ -f "$TARGETPATH" ]; then echo "$TARGETPATH is a file! Unable to list contents." else echo "Unable to find $TARGETPATH! Does it exist?" fi