View Full Version : [SOLVED] run bash commands from compiled C program?
JPotter
February 16th, 2008, 06:52 PM
just like the title: Is there a way to run a terminal command from inside a compiled C program.
Something along the lines of the windows command:
system(call_string);
where call_string is a character string (obviously)
stroyan
February 16th, 2008, 07:27 PM
That is a bit of any easy question.
The system() function is just the same in linux.
sudo apt-get install manpages-dev.
man system
JPotter
February 16th, 2008, 08:23 PM
Wow . . .
Thanks, this fixed my problem.
Edit: Rather . . . Now I can't figure out why my code didn't work in the first place.
rbprogrammer
February 16th, 2008, 08:45 PM
Wow . . .
Thanks, this fixed my problem.
Edit: Rather . . . Now I can't figure out why my code didn't work in the first place.
as you may already know, linux commands usually differ from windows commands.... did you rmember to change the windows commands to linux commands??
posting the part of your code that does the system( .. ) can help too
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.