Ibrahim F Haddad wrote:
> Hello all,
>
> I used to do a system call to 'sort' and 'fit_it' passing to it a
> fixed file name as:
>
> system ("slider 10 | fit_it -f Acocomo-log -xmgr | xmgr-dynamic -source
> stdin&");
> ^^^^^^^^^^^
> where Acocomo-log is the file name to be used.
>
> However, i added some more functionality as i made the file
> name specified by the user in a (char *fileName);
>
> So, how i do a system call with a variable name since the system
> call would then search for file fileName?
char buff[1024];
snprintf(buff, sizeof(buff),
"slider 10 | fit_it -f %s -xmgr | xmgr-dynamic -source stdin &",
filename);
system(buff);
--
Glynn Clements <[EMAIL PROTECTED]>