unix_g - shell (sh) command execution, output redirected to a variable
Sends a string cmd to Unix for execution by the sh shell. The standard output is redirected to scilab variable rep. Unix execution errors are trapped; *NOTE* that only the last shell command error is reported when a list of command separated by ";" is sent: this is not recommended.
if MSDOS then unix_g('dir '+WSCI+'\demos'); else unix_g("ls $SCI/demos"); end deff('wd=pwd()','if MSDOS then wd=unix_g(''cd'');.. else wd=unix_g(''pwd''); end') wd=pwd()