delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/02/19/08:51:52

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 19 Feb 2002 07:38:29 -0500
From: Jason Tishler <jason AT tishler DOT net>
Subject: Re: print command setting in config.ps for cygwin
In-reply-to: <007f01c1b8db$7a01c710$80c0b3d1@HUNG>
To: "Gene C. Ruzicka" <gcruzicka AT earthlink DOT net>
Cc: cygwin AT cygwin DOT com
Mail-followup-to: "Gene C. Ruzicka" <gcruzicka AT earthlink DOT net>, cygwin AT cygwin DOT com
Message-id: <20020219123829.GB2384@hp.com>
MIME-version: 1.0
User-Agent: Mutt/1.3.24i
References: <007f01c1b8db$7a01c710$80c0b3d1 AT HUNG>

--Boundary_(ID_+wU+xSBdUbmrbUQqkJ8SvQ)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline

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

--Boundary_(ID_+wU+xSBdUbmrbUQqkJ8SvQ)
Content-type: text/plain; charset=us-ascii; NAME=lpr
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=lpr

#!/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


--Boundary_(ID_+wU+xSBdUbmrbUQqkJ8SvQ)
Content-Type: text/plain; charset=us-ascii

--
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/
--Boundary_(ID_+wU+xSBdUbmrbUQqkJ8SvQ)--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019