RosettaCodeData/Task/Execute-a-system-command/J/execute-a-system-command.j
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

15 lines
361 B
Text

load'task'
NB. Execute a command and wait for it to complete
shell 'dir'
NB. Execute a command but don't wait for it to complete
fork 'notepad'
NB. Execute a command and capture its stdout
stdout =: shell 'dir'
NB. Execute a command, provide it with stdin,
NB. and capture its stdout
stdin =: 'blahblahblah'
stdout =: stdin spawn 'grep blah'