#!/usr/bin/ksh
# Script to list korn shell scripts
cd	${1:-.}
for next in *
do
	if [[ -f $next && -r $next ]]
	then
		if [[ $(head -1 $next) = "#!$(whence ksh)" ]]
		then
			if [[ -x $next ]] ; then execute="(x)";
			else	execute="()"; fi
			print "$next $execute"
		fi
	fi
done
