* $Id: bq.sno,v 1.4 1997-09-14 04:36:57 phil Exp $
*	execute a shell command line and capture stdout
*
*	like shell backquotes (hence the name)
*	p budne, june 20, 1994

*	optional second arg is string to use to seperate lines

	DEFINE("BQ(COMMAND,OFS)UNIT")			:(END_BQ)
BQ	UNIT = IO_FINDUNIT()				:F(FRETURN)
	INPUT(.X,UNIT,,'|' COMMAND)			:F(FRETURN)
	OFS = IDENT(OFS) ' '
	BQ = X						:F(BQF)
BQL	BQ = BQ OFS X					:S(BQL)
	ENDFILE(UNIT)
	DETACH(.X)					:(RETURN)
BQF	ENDFILE(UNIT)
	DETACH(.X)					:(FRETURN)
END_BQ
