Let's say I have a very large file and I want to process every line in that file by piping it to script.
cat large_file.txt | python processor.py
I'm not completely sure how the above operation works. Does the file get iterated over, passing each line to the processor waiting for the processor to finish then, once the processor is done pass the next line. Or does the entire file get read and then passed to the processor?
I really hope it's the first case.
Thanks