How to issue a C SHELL command within a C program

Doug Gwyn gwyn at smoke.BRL.MIL
Fri Aug 31 06:57:35 AEST 1990


In article <3985 at auspex.auspex.com> guy at auspex.auspex.com (Guy Harris) writes:
>	if (!sh)
>		sh = "/bin/sh";

Incidentally, while /bin/sh should always be used to execute commands
from a program, when you spawn an interactive subshell you should use
the valuse of the SHELL environment variable.  Similar for EDITOR and
PAGER.  Users are much more fussy about their interactive environments
and are therefore much more likely to notice if you don't give them
their preferences there.



More information about the Comp.unix.questions mailing list