Category: How To

post thumbnail

How to Capture The Output of a Linux Command in C++

Ok, I admit this is a pretty obscure one but this came up for a task at work today and I had forgotten exactly how to do this. I Googled around a bit and found a lot of answers I either didn’t understand completely or just seemed too complicated for what I was trying to accomplish. I had done this with the boost libraries before but I didn’t have them on this machine so I wanted a clean, stdlib type solution.