Call a terminal command in a C++ app

Dumb question of the day...

So I opened XCode and made a C++ project and got my terminal window to output "Hello, World!" Impressive right! Anyway what I really want to do is to call commands in the terminal window from my C++ app.

An example would be to "ls |grep" something into a list for further processing to use in another terminal command like "ditto" or something.

Can anyone point me in the right direction.

Thanks!!

Dual 2 GHz PowerPC G5, Mac OS X (10.4.4), Full network of 30+ Macs.

Posted on Mar 2, 2006 2:58 PM

Reply
2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Call a terminal command in a C++ app

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.