Scilab Function

host - exécution d'une commande Unix ou DOS

Calling Sequence

stat=host(command-name)

Parameters

Description

Envoie la chaîne command-name à l'interpréteur de commande (sh sous Unix, ou command.com sous DOS). La sortie standard et les erreurs sont reportées dans l'interpréteur de commande.

stat vaut -1 en sortie si la fonction ne peut pas être appelée (pas assez de mémoire par exemple) ou alors le code de sortie de l'interpréteur de commande.

Examples

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()
 

See Also

edit ,   manedit ,   unix_g ,   unix_s ,   unix_w ,   unix_x ,