Execute a Program

DESCRIPTION:

Executes a program with the environment of S-PLUS.

USAGE:

Splus EXEC command 

REQUIRED ARGUMENTS:

command
the name of an executable file. If this file resides in one of the directories on the shell's path (or in $SHOME/cmd), the full pathname need not be given.

DETAILS:

EXEC facilitates the execution of any program (compiled executable or shell script) in an environment matching that of the normal S-PLUS process. This environment differs from that of the login shell in variables SHOME, S_WORK, etc., all set in the S-PLUS shell script. The search path (list of directories searched by the shell for executable files) will be that of the invoking shell, with $SHOME/cmd prepended.

If an executable file command resides in $SHOME/cmd, it can be invoked simply with Splus command. The EXEC utility is useful primarily with executables outside $SHOME/cmd.

SEE ALSO:

.

EXAMPLES:

# Find how the environment of EXEC differs from the usual one. 
printenv | sort > env.shell 
Splus EXEC printenv | sort > env.splus 
diff env.shell env.splus