Write a python script, the function is to read a 100M file A line by line and write it to another file B after processing. After execution, B will be 600M in size.
It’s okay to execute Python scripts separately, but it’s memory-intensive to call execution with shell scripts
When executed separately, you see it in topSplit.py memory usage < 2%
When the shell call is executed, you see it in topBash memory usage > 20%
Read and write code in Python script:split.py
ReadHandle = open (fileName)
Please give me your advice. Thank you.
What do you mean by separate execution?