Monday, September 26, 2011

How will you list files in a directory without using ‘ls’ command?

#!/usr/bin/sh

for FILE in *
do
if [ -f $FILE ]
then
echo $FILE
fi
done

No comments :