[prev in list] [next in list] [prev in thread] [next in thread]
List: gnuplot-info-beta
Subject: Re: Returning system command output to a string variable
From: Ethan Merritt <merritt () u ! washington ! edu>
Date: 2005-03-08 17:03:30
Message-ID: 200503080903.30597.merritt () u ! washington ! edu
[Download RAW message or body]
On Monday 07 March 2005 10:42 pm, Juergen Wieferink wrote:
> I meant an ordinary function which takes a string (the system
> command) and returns another one---the output of the system command.
> Using the backtics wouldn't work for RFE#1108413.
Ah, sorry.
I assumed you were continuing the previous discussion, which
involved also the substitution of macro values into the command
passed to the system. For example
result = system("grep @key @file")
The problem there is that macro substitution doesn't happen
inside quoted strings.
If you don't care about macro substitution, then I think it
would be possible. I was earlier very worried about memory leaks
from such an operation, but I think I now understand how to
avoid leaking memory.
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington 98195-7742
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
gnuplot-beta mailing list
gnuplot-beta@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic