print command setting in config.ps for cygwin

Jason Tishler jason@tishler.net
Tue Feb 19 04:33:00 GMT 2002


Gene,

On Mon, Feb 18, 2002 at 04:22:11PM -0800, Gene C. Ruzicka wrote:
> But the online User's Guide
> for Cygwin says that the lp, lpr commands don't 
> work in Cygwin, and that the MS print command 
> should be used to print from a cygwin command 
> line.

See attached for my latest PostScript version of lpr.  See the following
for PCL versions:

    http://sources.redhat.com/ml/cygwin/2001-04/msg00657.html

HTH,
Jason
-------------- next part --------------
#!/bin/bash

# $Id: lpr,v 1.4 2002/02/07 15:38:52 jatis Exp $

Server=i3125lp3
Printer=p44sb007

PostscriptOptions='-o l'
ProgramName=$(basename $0)
WinDir=$(cygpath -u $WINDIR)
Lpr=$WinDir/system32/lpr

TempFile=/tmp/$ProgramName.$$
WinTempFile=$(cygpath -w $TempFile)

cat >$TempFile
if [ "$(head -c 2 $TempFile)" = %! ]
then
	LprOptions=$PostscriptOptions
fi

$Lpr -S $Server -P $Printer $LprOptions "$WinTempFile"
Status=$?

rm -fr $TempFile
exit $Status

-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list