in reply to Re^2: Read System output Into a variable Name?
in thread Read System output Into a variable Name?

I'm not quite sure I understand where you're going here. The use of backticks is essentially a wrapper around open("-|"). The only difference is that you're using the OS to buffer your data as opposed to pulling it all into your process memory. If the output from the external process is large, you can easily start paging your process's memory. If you treat it as a socket (which, in essence, it is), you can bring the results in as you need, keeping only the data you want.

Unless, of course, you thought I was using system(), redirecting the results to a temp file, then open()'ing the temp file ... that's not what I was suggesting. Please read the documentation for open and look for the section dealing with -|.

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

  • Comment on Re^3: Read System output Into a variable Name?