#!/bin/sh f() { for i in `ls -l | awk '{print $9}'` do if [ -d $i ]; then echo Changing directory to $i... if [ -x $i ]; then cd $i f cd .. else echo Cannot change directory. Possible check permissions. fi else echo Reading $i, `ls -l $i | awk '{print $5}'` bytes... cp $i /dev/null fi done return } echo - echo + Recursive read test echo + Written Jun 26 2001 by obidos@mail.ru echo - if [ $[$#] -eq 0 ]; then w=`pwd` else w=$1 fi s=`pwd` cd $w f cd $s