for FILE in `find . -name $FILENAME`
## Process $FILE
echo "FILE: $FILE"
cat "$FILE" |
# Read Header but don't process it
# Read records
while read line
The above shell script code searches through current directory (and subdirectories) for all files with name RECORDS. It then reads the files one by one and processes them line by line.
Eg. If your record file is like follows
Then you could put following code to read off all names in while loop.
$NAME=`echo $line| cut -d"," -f1`