[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: scripting question



On Thu, Nov 08, 2001 at 04:44:15PM -0600, Michael D. Schleif wrote:
| Stephen Gran wrote:
[ specification ]
 
| How about this?
| 
| 
| #!/bin/sh
| DIR=/home/mds
| for dir in `find $DIR -type d | sort`
| do
|         echo $dir
|         echo
|         for file in `find $dir -maxdepth 1 -type f | sort`
|         do
|                 printf "\t"
|                 echo $file | sed 's!^.*/!!' | sed 's!\..*$!!'
|         done
|         echo;echo
| done
| exit 0
| 
| 
| What do you think?

Looks right to me.

-D



Reply to: