Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unix Shell Comand inside C/C++ code?

Status
Not open for further replies.

csd

Programmer
May 10, 2001
6
US
Friends:
Please tell me if it's possible to run an Unix shell command
inside a C/C++ program? The question may be too stupid but we do need run such a command at some
point inside the code, then continue to execute the rest part of the code...

If possible, how to do that?

Thanks.

csd
 
not a stupid question at all

you need the system() function

system("ls")

for instance Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top