|
|
> Sorry for the OT but I'm sure you guys are good at this. If I want to
> send the output of
>
> ps -aux > /tmp/file
>
> to a memory sstream instead of a file is there any way to do
> it in C++?
Not entirley sure I understood the question, but I *think* popen() might be the answer anyway...!
So something like (caution: from memory...)
fd = popen("ps -aux", "r");
Ought to return a stream you can read from. Probably. I think.
Not C++ as such, but you can "do it in C++"...
Also - not sure how well popen() works on win32, I have used it sometimes and it's been OK, but I have heard bad reports... don't know if that matters to you though?
--
Ian
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
[ Direct Link to Message ] | |
|
| |