! 26 May 88
!
! Terrence Lambert
!
! printpc.cmd - this file is called via 'term -x printpc'
! the DOS term must be running with either -c or 'set control on' to work
! printer command name may be changed for systems using a different syntax.
! this should be done after the next line with a comment on it.
if "$1"="" | "$2" !=""
	xmit "Usage: printpc pcfile\r\n"
	quit
endif

iferror get $1 /tmp[c]
	xmit "printpc: could not print pc file $1\r\n"
else
	if "$(_filename)"=""
		xmit "printpc: could not print; pc file $1 not found\r\n"
	else
! change printer command on next line if necessary:
		run lpr $(_filename)
		noerror erase $(_filename)
		xmit "file $(_filename) has been spooled\r\n"
	endif
endif
quit
