[wellylug] Programming Question

Stephen Judd sljudd at paradise.net.nz
Sat Nov 29 13:39:01 NZDT 2003


On Sat, 2003-11-29 at 12:13, Jonny Robertson wrote:
> At that point, look at man exec() again, or snprintf() the string you 
> want to execute into an appropriate buffer, and call system(buf);

You might also consider whether open() with the O_CREAT flag is what you
want. (man 2 open for details).

Can I recommend the Wrox book Beginning Linux Programming?, by Stones
and Matthew? Lots of good info on basic C programming for Linux.

It also sounds as though what you are trying to do might be easier
accomplished in a scripting language. If you have reasons to write in C,
using existing C libraries seems more natural, less resource intensive
and easier than shelling out all the time.

Stephen




More information about the wellylug mailing list