1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
4
<LANGUAGE>eng</LANGUAGE>
6
<TYPE>Scilab Function</TYPE>
7
<DATE>April 1993</DATE>
8
<SHORT_DESCRIPTION name="host"> Unix or DOS command execution</SHORT_DESCRIPTION>
10
<CALLING_SEQUENCE_ITEM>stat=host(command-name) </CALLING_SEQUENCE_ITEM>
15
<PARAM_NAME>command-name</PARAM_NAME>
17
<SP>: A character string containing Unix sh instruction</SP>
21
<PARAM_NAME>stat</PARAM_NAME>
23
<SP>: An integer flag</SP>
30
Sends a string <VERB>command-name</VERB> to Unix for execution by the command interpreter (sh under Unix, or command.com under DOS). Standard output and standard errors of the shell command are written in the calling shell.
31
<VERB>stat</VERB> gives -1 if host can't be called (Not enough system memory
32
available) or the command interpreter return code.</P>
36
host("ls $SCI/demos");
37
host("emacs $SCI/demos/wheel2/Makefile");
38
deff('wd=getdir()','if MSDOS then host(''cd>''+TMPDIR+''\path'');..
39
else host(''pwd>''+TMPDIR+''/path'');end..
40
wd=read(TMPDIR+''/path'',1,1,''(a)'')')