#!/bin/sh

if [ "$#" -ne 1 ]; then
    echo "Illegal number of parameters"
    exit 1
fi

dir="$1"
if [ ! -d "$dir" ]; then
    echo "Directory does not exist"
    exit 1
fi

ls "$dir"
