Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.questions Subject: Re: How to issue a C SHELL command with Message-ID: <3903@auspex.auspex.com> Date: 15 Aug 90 20:28:08 GMT References: <26@<25279> <22000008@ux1.cso.uiuc.edu> Organization: Auspex Systems, Santa Clara Lines: 12 >> 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()".