This is part of a much larger bash script that I'm porting.
Then one of the first things you should be doing is understanding what the shell script was trying to do, instead of just wrapping "system()" calls around things.
The idea is the get the same things done with code that is shorter, more efficient, easier to understand, and more resilient to a wider range of edge and error conditions. Using four independent processes in a system call just to get a line count on a file (or things to that effect) seems like the wrong way to go about it. |