for i in A B C
do
grep "something" $iFILE > $iDESTFILE
'do something with' $iFINFILE
done
-------------------------------
So as you guys can see, if I had A through Z, I don't want to write out everything in the loop 26 times.
Any ideas?
I tried '$"$i"FILE' but that didn't work. I just want to replace the $iFILE with AFILE and have it reference that file instead of the literal AFILE text.
are you going to define all your files (from A to Z) inside the script?? ie hardcoded? or are you going to store them in a file or something. then open the file and loop through them.?
thank you ghostdog, bakunin and cfajohnson...between the three of you, i've got it taken cared of...
i'm going to take ghostdog and bakunin's suggestion of referenceing the file directly...i forgot to mention that there's a set of variables that is not as pretty looking like a_file.txt, b_file.txt, etc..., for that case, i'm going to use bakunin and cfa's eval statement...