Help Contents / Communication / Receivers / Shell

Shell command
(Shell command wordflag)

Outputs the result of running "command" as a shell command. (The command is sent to /bin/sh, not csh or other alternatives.) If the command is a literal list in the instruction line, and if you want a backslash character sent to the shell, you must use \\ to get the backslash through Logo's reader intact.  The output is a list containing one member for each line generated by the shell command.  Ordinarily each such line is represented by a list in the output, as though the line were read using READLIST.  If a second input is given, regardless of the value of the input, each line is represented by a word in the output as though it were read with READWORD. 

Example: 

	to dir 
		foreach bf bf bf shell [dir] 
		[	if not empty? ? 
			[	(pr last ? "\; butlast bf bf ?) 
			] 
		] 
	end 


previous: readStructBin	next: ShellSpawn
