#!/bin/bash -x # Write a list for loop that takes each file in current directory # and tests it to see if it is readable # If it is, say so # # Doesn't handled embedded spaces well. for fn in `ls` do if [ -r "$fn" ] then echo "$fn is a regular file" fi done