easy, basic, question...
Doug Gwyn
gwyn at smoke.BRL.MIL
Sat Aug 19 16:40:34 AEST 1989
In article <11072 at neon.Stanford.EDU> wolfe at neon.stanford.edu (Michael R. Wolfe) writes:
-... That is, I'm being forced to do multiple strcat's to form a
-string to send to system. Is there a way around this?
Yes: Use a single sprintf() into a character array of sufficnet size,
then call system with that array name as its argument.
-In addition, is there any way to find the result of a unix command
-called from C without having to send it to a file and then open
-the file.
See popen(3S) in your UNIX Programmer's Reference Manual.
More information about the Comp.unix.questions
mailing list