How to issue a C SHELL command with

Guy Harris guy at auspex.auspex.com
Thu Aug 16 06:28:08 AEST 1990


>> How can I issue a statment that executes a C SHELL command within a C program?
>> I would appreciate any helps.
>
>You can use the "system" call.  Use "man system" for more info.

Well, sort of.  In order to run a *C* shell command, as the original
poster specified, rather than a *Bourne* shell command, as "system()"
does on any valid implementation, you have to construct a Bourne shell
command that runs the C shell, asking it to run a C shell command....

In general, I'd recommend replacing the C shell command in question with
a Bourne shell command, if at all possible, and just using "system()".



More information about the Comp.unix.questions mailing list