Next Previous Up Top Contents Index

18 The SYSTEM Package

call-system

Function

Package

system

Syntax

call-system string &optional shell-type => status

Arguments

string

A string.

shell-type

A string.

Values

status

The exit status of the invoked shell.

Description

call-system allows Unix shell commands to be called from Lisp code. The output goes to standard output, as UNIX sees it (This normally means*terminal-io* in LispWorks.)
string is a string which is the shell command you wish to execute. shell-type gives the type of shell required. The default is the Bourne shell, /bin/sh. The C shell may be obtained by specifying"/bin/csh".
call-system returns the exit status of the shell invoked to execute the command.
Example

(call-system (format nil "adb ~a < ~a > ~a"
                (namestring   a)
                (namestring   b)
                (namestring   c)))

See Also

open-pipe
call-system-showing-output

LispWorks Reference Manual - 15 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker