delorie.com/archives/browse.cgi | search |
Sender: | tim AT riker DOT skynet DOT be |
Message-ID: | <3B00D923.71196CF3@falconsoft.be> |
Date: | Tue, 15 May 2001 09:22:11 +0200 |
From: | Tim Van Holder <tim DOT vanholder AT falconsoft DOT be> |
Organization: | Falcon Software NV |
X-Mailer: | Mozilla 4.77 [en] (X11; U; Linux 2.2.16-3 i686) |
X-Accept-Language: | en, nl-BE, nl |
MIME-Version: | 1.0 |
To: | djgpp AT delorie DOT com |
Subject: | Re: Linux lpr under DJGPP? |
References: | <Pine DOT SUN DOT 3 DOT 91 DOT 1010513111651 DOT 13251I AT is> <3AFEA012 DOT EF9614DC AT lps DOT u-psud DOT fr> |
Reply-To: | djgpp AT delorie DOT com |
> Works but with 3 drawbacks: > 1. does not close the window at end (I mut type "quit") > 2. does not accept wild chars (to proceed several files) as does "lpr" > 3. does not accept gzipped files as does "lpr". > > This means that I should write a small program in C/DJGPP or F77/DJGPP > to handle a number of files and gunzip them it suffix .gz is present. > But perhaps somebody did it already... Note: this is just off the top of my head and is therefore not guaranteed to work as expected. No warranty/Caveat emptor/etc etc *** not-lpr.sh starts here #! /bin/sh ps_to_printer="gs -q -dNOPAUSE -dBATCH -sDEVICE=ljet4 -r600x600 -sOutputFile=LPT1" : ${TMPDIR=/tmp} tmpfile="$TPMDIR/not-lpr.ps" test -n "$@" || exit 0 force= if test "$1" = "-f"; then force=yes shift fi for PSFILE in $@; do case $PSFILE in *.ps.gz) gzcat $PSFILE >$tmpfile $ps_to_printer $tmpfile rm -f $tmpfile ;; *.ps.bz2) bzcat $PSFILE >$tmpfile $ps_to_printer $tmpfile rm -f $tmpfile ;; *.ps) $ps_to_printer $PSFILE ;; *) if test "$force" = "yes"; then $ps_to_printer $PSFILE else echo "Skipping $PSFILE because it doesn't have a recognized extension" echo "Use '-f' as first argument to process this file anyway" fi ;; done **** end of not-lpr.sh -- Tim Van Holder - Falcon Software N.V. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= This message was posted using plain text. I do not endorse any products or services that may be hyperlinked to this message.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |