#!/bin/bash

case $# in 
  0 | 1) echo Insuficiente numero de argumentos ; exit 1 ;; 
  *) if test -d $1 
     then dir=$1 ;
          while( true ) do
            shift  
            if test $# -eq 0 
            then exit 3  
            else test -f $dir$1 || echo $dir$1 no es un fichero regular ;
            fi
          done
     else echo El primer argumento no es un directorio ; exit 2 ;
     fi ;;
esac