#!/bin/bash

# lists contents of subdirectory

# check for correct number of arguments
if [ $# -ne 2 ]
then 
  echo "$0: takes 2 arguments: directory subdirectory" 1>&2
  exit 1
fi
if [[ ! -d $1 ]]  
then
  echo "$0: $1 is not a directory" 1>&2
  exit 1
fi
if [[ ! -d $1/$2 ]]
then
  echo "$0: $2 is not a subdirectory of $1" 1>&2
  exit 1
fi

ls -l $1/$2

#implicit exit 0
