Calling a c executable from another executable

Don Ingli AGRISCS at umcvmb.missouri.edu
Wed Dec 6 05:36:30 AEST 1989


Another way is this....

char out[80], arg1[80];
strcpy(arg1,"hello");
sprintf(out,"banner %s",arg1);
system(out);

ie you can use the system command with the sprintf if you want to pass
arguments...
system("banner hello"); is the same as the above..


+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
|  DON INGLI                                                           |
|  UNITED STATES DEPARTMENT OF AGRICULTURE - SOIL CONSERVATION SERVICE |
|  WORK: (314) 875-5344      FAX: (314) 875-5335                       |
|                                                                      |
| bitnet: agriscs at umcvmb.bitnet  internet: agriscs at umcvmb.missouri.edu |
| attmail: attmail!attbl!arpa!umcvmb.missouri.edu!agriscs              |
|                                                                      |
| ALL OPINIONS IN THIS NOTE ARE OF MY OWN AND DO NOT REPRESENT THE     |
| FEDERAL GOVERNMENT OR THE UNIVERSITY OF MISSOURI-COLUMBIA            |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+



More information about the Comp.unix.wizards mailing list