#!/bin/bash echo This is the script $0 # $1 is the directory you want to list for file in $1/* do if [ -d $file ] then echo Directory $file else echo Ordinary file $file fi done