I hope someone can give me some insight into a problem I had.
I coded a KORN shell script to read files and change data in them.

I read a list of files from a file using a while read.
then unzipped the file
read each record in a while read
used awk substr to get positional data
changed data
wrote to temp file
when file was done I wrote back to the original file name
then zipped the file.
I then read the next file and looped until all files were processed.

the problem was that each file took longer to process than the last.
The first 3 minutes, then 7 minutes, them 12, then 20 then 60 minutes.

I killed the script and ran again with the remaining files and the last files
performed the same. The first file quickly then each file went slower.

This was a one time thing and it is done but I am very curious as to why
it would perform this way.

Any information on the way KORN shell works would be appreciated.


Hello Rbezona!

I think it might help if we could see the script that was used. I can't think of anything specific to ksh that would cause that behavior, but I'm wondering if perhaps each iteration was starting over from the beginning with a longer list of files...

For instance first run processes file1, second run processes file1 AND file2 (instead of just file2) etc...