Script No .
Definition:
Write a shell script to display the name of all the executable file from the current
directory.
Script:
clear
for i in `ls`
do
if [ -x $i ]
then
echo $i
fi
done
OR
countx=0
for i in *
do
if [ -x $i ]
then
countx=`expr $countx + 1`
fi
echo "Number of exetable files are $countx"
done
OR
for i in `ls`
do
if [ -x $i ]
then
echo "$i"
fi
done