: # loop for all files in the current directory echo $1 echo `ls $1` echo for loopvar in `ls $1` do echo loopvar is $loopvar if [ -f $loopvar ] then echo $loopvar is a file "\c" if [ -r $loopvar ] then echo and is readable else echo and is NOT readable fi fi done