
UNIX shell scripts/commands..??
Quote:
>What is the preferred method for running UNIX shell scripts or commands
>from with ANSI C? Are there problems with doing so with different shell
>variants? That is, would the procedure be different for /bash vs. /tcsh??
There is only one ANSI C method for running external scripts/commands:
system().
In Unix, system() passes its argument to a Bourne shell to be interpreted
and executed as a command line, so you can take advantage of all the sh
features. Of course, you can start scripts written in whatever
scripting language you want.
Dan
--
Dan Pop
CERN, CN Division
Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland