View Single Post
Old Apr 11th, 2005, 3:49 PM   #2
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
make a list of your files to process with the 'ls' command and read the filenames in as paramaters and have your script run through them in a while loop... like so:

#!/bin/sh


FILELIST='myfile.lst'

ls -lt | grep -v "unwanted_file" | awk '{print $9}' >> $FILELIST

LINES=`cat $FILELIST`

for i in $LINES
do
	./count.sh $i
        sleep 5
done

rm $FILELIST

echo "Complete."
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote