: # loop for all files in the current directory for loopvar in `ls` do 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