#!/bin/sh################################################################################ listdir# Lists a directory. Spits out an error if the specified directory is# invalid.################################################################################ Check to see if $1 is blank.if [ $1 == "" ] then # Have the user enter a directory name echo -n "Enter a directory name: " read dirname until [ -d $dirname ] do echo Invalid directory echo -n "Enter a directory name: " read dirname done ls $dirnameelse ls $1fi