| Edit Rename Undo Refresh |
|
|
History |
.............................................................................. ..............................................................................
** If =*\WRITE*= is specified, you can send data to the command standard input ** If =*\WRITE*= is specified, you can send data to the command standard input
** If =*\READ*= is specified, then events will be generated each time the comm ** If =*\READ*= is specified, then events will be generated each time the comm
If you use the =*\INPUT*= and =*\OUTPUT*= keywords instead of =*\READ*= and =* If you use the =*\INPUT*= and =*\OUTPUT*= keywords instead of =*\READ*= and =*
.............................................................................. ..............................................................................
{Seealso
{Seealso [cat/process] [comp/gb/process] [lang/lof]
[cat/process] [comp/gb/process] [lang/lof] }
}
.............................................................................. .............................................................................. DIM sLine AS String DIM sLine AS String LINE INPUT #LAST, sLine READ #LAST, sLine, -256 sOutput &= sLine sOutput &= sLine .............................................................................. ..............................................................................
{syntax {syntax
[ _Process_ *\=* ] *EXEC* _Command_ [ *WAIT* ] [ *FOR* { { *READ* | *INPUT* } [ _Process_ *\=* ] *EXEC* _Command_ [ *WAIT* ] [ *FOR* { { *READ* | *INPUT* }
*EXEC* _Command_ *TO* _Variable_ *EXEC* _Command_ *TO* _Variable_
} }
.............................................................................. ..............................................................................
* If =*\WAIT*= is specified, then the interpreter waits for the command ending * If =*\WAIT*= is specified, then the interpreter waits for the command ending
* If =*\F\[../or]*= is specified, then the command input-outputs are redirecte * If =*\FOR*= is specified, then the command input-outputs are redirected so t
** If =*\WRITE*= is specified, you can send data to the command standard input ** If =*\WRITE*= is specified, you can send data to the command standard input
.............................................................................. ..............................................................................
If you use the =*\INPUT*= and =*\OUTPUT*= keywords instead of =*\READ*= and =* If you use the =*\INPUT*= and =*\OUTPUT*= keywords instead of =*\READ*= and =*
=_Name_= is the event name used by the [../../comp/gb/process] [../../def/obje
You can get a reference to the internal [/comp/gb/process] [../../def/object] You can get a reference to the internal [/comp/gb/process] [../../def/object]
If you use the second syntax, the command is executed, the interpreter waiting If you use the second syntax, the command is executed, the interpreter waiting
{Example {Example
' Get the content of a directory ' Get the contents of a directory
EXEC [ "ls", "-la", "/tmp" ] WAIT EXEC [ "ls", "-la", "/tmp" ] WAIT
} }
{example {example
' Same thing, but in background ' Get the contents of a directory into a string
DIM sOutput AS String
EXEC [ "ls", "-la", "/tmp" ] TO sOutput
}
{example
' Get the contents of a directory into a string, but in background
DIM Content AS String DIM sOutput AS String
EXEC [ "ls", "-la", "/tmp" ] FOR READ ' A specific event name is used
EXEC [ "ls", "-la", "/tmp" ] FOR READ AS "Contents"
... ...
PUBLIC SUB Process_Read() PUBLIC SUB Contents_Read()
DIM sLine AS String DIM sLine AS String
LINE INPUT #LAST, sLine LINE INPUT #LAST, sLine
Content = Content & sLine sOutput &= sLine
PRINT sLine
END
PUBLIC SUB Contents_Kill()
PRINT sOutput
END END
} }
.............................................................................. ..............................................................................
{Seealso
[cat/process] [comp/gb/process] [lang/lof]
{Seealso }
[cat/process] [comp/gb/process] [lang/lof]
}
{syntax {syntax
[ _Process_ *\=* ] *EXEC* _Command_ [ *WAIT* ] [ *FOR* { { *READ* | *INPUT* } [ _Process_ *\=* ] *EXEC* _Command_ [ *WAIT* ] [ *FOR* { { *READ* | *INPUT* }
*EXEC* _Command_ *TO* _Variable_ *EXEC* _Command_ *TO* _Variable_
} }
Executes a command. An internal [/comp/gb/process] object is created to manage Executes a command. An internal [/comp/gb/process] [../../def/object] is creat
The command must be specified as an array of strings containing at least one e The command must be specified as an array of strings containing at least one e
* If =*\WAIT*= is specified, then the interpreter waits for the command ending * If =*\WAIT*= is specified, then the interpreter waits for the command ending
* If =*\F\OR*= is specified, then the command input-outputs are redirected so * If =*\F\[../or]*= is specified, then the command input-outputs are redirecte
** If =*\WRITE*= is specified, you can send data to the command standard input ** If =*\WRITE*= is specified, you can send data to the command standard input
** If =*\READ*= is specified, then events will be generated each time the comm ** If =*\READ*= is specified, then events will be generated each time the comm
If you use the =*\INPUT*= and =*\OUTPUT*= keywords instead of =*\READ*= and =* If you use the =*\INPUT*= and =*\OUTPUT*= keywords instead of =*\READ*= and =*
You can get a reference to the internal [/comp/gb/process] object created by u You can get a reference to the internal [/comp/gb/process] [../../def/object]
If you use the second syntax, the command is executed, the interpreter waiting If you use the second syntax, the command is executed, the interpreter waiting
.............................................................................. ..............................................................................
.............................................................................. ..............................................................................
{Seealso
[cat/process] [comp/gb/process] [lang/lof] {Seealso
} [cat/process] [comp/gb/process] [lang/lof]
}
.............................................................................. .............................................................................. * If =*\WAIT*= is specified, then the interpreter waits for the command ending * If =*\WAIT*= is specified, then the interpreter waits for the command ending * If =*\F[../or]*= is specified, then the command input-outputs are redirected * If =*\F\OR*= is specified, then the command input-outputs are redirected so ** If =*\WRITE*= is specified, you can send data to the command standard input ** If =*\WRITE*= is specified, you can send data to the command standard input .............................................................................. ..............................................................................
.............................................................................. .............................................................................. * If =*\WAIT*= is specified, then the interpreter waits for the command ending * If =*\WAIT*= is specified, then the interpreter waits for the command ending * If =*\F[/lang/or]*= is specified, then the command input-outputs are redirec * If =*\F[../or]*= is specified, then the command input-outputs are redirected ** If =*\WRITE*= is specified, you can send data to the command standard input ** If =*\WRITE*= is specified, you can send data to the command standard input .............................................................................. ..............................................................................