cplusplus.com
C++ : Forum : UNIX/Linux Programming : Question on popen
 
cplusplus.com
Information
Documentation
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs


post Question on popen

nkumar85 (30)
Hello All,

Is it possible to use popen for multiple piping.

Ex: If I want to achieve "last | sort | wc -l" command using popen, how to do it?

Is it possible?

Thanks in advance
Nanda
lloydchristmas759 (71)
No, you can't.
You'll have to use dup(), fork() and exec().
nkumar85 (30)
Thank you Mr. lloydchristmas759 for your comments. Please share any examples if you have.
lloydchristmas759 (71)
Take a look at the first post of this thread:

http://www.gidforums.com/t-3369.html

It should provide you with the basics. Then you will need to adapt to your needs.
Topic archived. No new replies allowed.