Hey all,
So I have this challenge where I am attempting to compare record counts from within several different log files. I want input and output counts for each file, and I want to compare that with the result of the input/output comparison from a separate--but related file.
Example:
File 1A has input and output rec count of 4, I need to then check
File 1B to ensure that it, too, has an input/output rec count of 4.
Then I move on to files 2A and 2B, 3A and 3B, etc.
Here is what I have set up so far:
I have each file set to its own variable, so file1A=/dir/dir/.../file1A.out, etc.
Then, I have a variable which contains all the file variables, so FILELIST="$file1A $file1B...", etc.
Next, I have a for loop--for i in $FILELIST; do...
Inside that for loop, I am making my file i/o comparisons.
My question is this, is there a way to increment that variable (pointer?) to the related second file for each, so that I can compare the i/o record counts between them? In other words, outside of the looping construct, which increments the counter, how do I make the variable go ahead and increment before it reaches the top of the for loop again. And also, can I--after comparing a set of related files--move to the THIRD file in the list, skipping over both the files I just compared.
I hope I have explained my situation clearly enough. If I am going completely down the wrong path with my logic constructs, please tell me that, too. I am using ksh.
Thank you