shell - execute background shell command


v = shell(StrExpr)


The shell function executes a command with the UNIX shell in the background.  StrExpr is a valid UNIX shell command.  The process number of the child process is returned.  The command is executed as if it were typed at the terminal using the UNIX shell sh

The shell is executed in the background.  This function returns almost immediately.  It does not wait for the shell to complete execution.  A number of tasks may be begun simultaneously using this function. 


The shell function is used in the following example to spool a file called “stuff” to the printer.  The process number of the created shell is printed. 
	a = shell("pr stuff | lpr")
	print a
The program continues while the printer operates. 

from The Basmark QuickBASIC Programmer’s Manual by Lawrence Leinweber