Scilab Reference Manual |
---|
host — Unix or DOS command execution
stat=host(command-name)
Sends a string command-name 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. stat gives -1 if host can't be called (Not enough system memory available) or the command interpreter return code.
host("ls $SCI/demos"); host("emacs $SCI/demos/wheel2/Makefile"); deff('wd=getdir()','if MSDOS then host(''cd>''+TMPDIR+''\path'');.. else host(''pwd>''+TMPDIR+''/path'');end.. wd=read(TMPDIR+''/path'',1,1,''(a)'')') wd=getdir()
<< hat | hypermatrices >> |