for A in `ls -ltr` do if [ -f $A ] then wc -l $A fi if [ -d $A ] then echo "dir" ls $A fi done