Guest_imported
New member
- Jan 1, 1970
- 0
Hi, im trying to make a small script which will allow someone to scan a directory (from the directory imediently above that one) in order to report back on any files which start with a UPPPER-CASE character, as well as any directorys which start with a lower-case character.
Im able to scn for both dirs and files but i still cant get it to report back on what i require.
Hope someone can help.
Thanks
Code:
for var in `ls `
do
if [ -f $var ]
then
echo "file $var"
else
if [ -d $var ]
then
echo "dir $var"
fi
fi
done
Im able to scn for both dirs and files but i still cant get it to report back on what i require.
Hope someone can help.
Thanks