Next Previous Up Top Contents Index

18 The SYSTEM Package

call-system-showing-output

Function

Package

system

Syntax

call-system-showing-output cmd &key (shell-type "/bin/csh") (prefix "; ") (show-cmd t) (output-stream *standard-output*)) => status

Arguments

cmd

A string.

shell-type

A string.

prefix

A string.

show-cmd

A boolean.

output-stream

A symbol.

Values

status

The exit status of the UNIX shell.

Description

call-system-showing-output is an extension tocall-system which allows output to be redirected to places other than the shell process from which the LispWorks image was invoked.call-system-showing-output therefore allows the user to, for example, invoke a shell command and redirect the output to the current Listener window.
cmd is a UNIX command. shell-type is a UNIX shell type. The default is "/bin/csh". prefix is a prefix to be printed at the start of any output line. The default value is"; ". show-cmd specifies whether or not the cmd invoked will be printed as well as the output for that command. Ift then cmd will be printed. The default value for show-cmd is t. output-stream specifies where the output will be sent to. The default value is*standard-output*.
The function returns the exit status of the shell invoked to execute the command.
Examples

FOREIGN 13 >  (call-system-showing-output "pwd" :prefix "***" :show-cmd t)
***pwd
***/usr/users/lclclclc/images
0

FOREIGN 14 > (call-system-showing-output "pwd" :prefix "***" :show-cmd nil) ***/usr/users/lclc/images 0

See Also

call-system
open-pipe

LispWorks Reference Manual - 15 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker