I have a python script that basically does some stuff on a file and results in a shorter file. I want the script to continue running on each subsequent output file until the output file and the most recent input file have the same number of lines.
The python script works like this:
python Joiner.py input.txt output.txt
I want to create a BASH script that will run something like this:
while [outputfilelines -lt inputfilelines]
do
python Joiner.py inputfile.txt outputfile.txt
done
Where each output file then becomes the input file for the next loop. I've tried a few different things but I can't seem to get it to work correctly. I can't figure out how to keep one file in the loop and spit out the other one.
Any help would be greatly appreciated.
Thanks.