FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


C++ linux piping





Antoine_935
Hi all.

I have to get the output of a system command under linux.
How can I open a pipe with the output of this command writing to it ?

In fact, how can I get the output of this command, with C++ ?
Nyizsa
As you would do with any other commands.
Code:
cin >> input;

Then you can pipe the two commands together:
Code:
command | your-program
Antoine_935
well... the program i already running when I need this output.
Liu
Have some kind of infinite loop that is listening for command line inputs or system outputs then.
Nyizsa
Are you trying to get the state of a process, or something similar? What is the original command, and what does your program intend to do?
Antoine_935
This is FLOOD !

Read the question before posting stupid answers !
I got the solution: popen, like in PHP
Related topics
linux-windows c/c++ programming
linux windows c programming
Linux
Linux & Dell C-610 Laptop. Please find me a fan driver.
Linux & Windows
Tutorials-How To Install Winxp And Linux To The Same Compute
Co sadzicie o linuxie, jako systemie do domu...
SUSE Linux 10 apache installation
FAT32 or NTFS?
Which C++ IDE do you use?
linux with xp
Dualboot Linux/Windows with XP bootloader
USB 128 MB Linux
Storing system calls in C
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.