|
the read in the inner loop is a subprocess. All variable values set or changed inside the inner loop are not known outside of it. If the files are small try to exchange the while-construct against a for-loop. If not, store meta-informations in the inner loop into files to have them outside. But this can decrease the speed very much.
But actually I do not see the need for double loops. Why not grep each line from tmplist.txt on the first file?
|