Node:Passing Commands to the OS, Next:Keeping track of Time, Previous:Threading Words, Up:Words
Gforth allows you to pass an arbitrary string to the host operating
system shell (if such a thing exists) for execution.
sh       "..." --         gforth       ``sh''
system to pass it to the host
operating system for execution in a sub-shell.
system       c-addr u --         gforth       ``system''
$?       -- n         gforth       ``dollar-question''
Value - the exit status returned by the most recently executed
system command.
getenv       c-addr1 u1 -- c-addr2 u2        gforth       ``getenv''