FILES
WHICH STARTS WITH ‘A’ IN THE CURRENT DIRECTORY:
for i in *
do
x=$(echo $i|cut -b 1)
if
[ $x = "a" ]
then
echo $i
else
continue
fi
done
OUTPUT:
[@localhost ~]$ sh firstlet.sh a
acceptlogin.sh
add.sh
a.out
No comments:
Post a Comment
Thanks for your valuable comments