Running a command within another program. How to do this with C.

This code snippet will run the date command. The execl() function is very useful for executing a command within your C program.You replace the NULL identifiers with any extra arguments to pass to the program. I prefer this over the system() function. #include <unistd.h>   int main(void) {   execl("/bin/date", "%c", NULL, NULL, NULL); return … Read more