delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
X-DNSBL-MILTER: | Passed |
X-Matched-Lists: | [] |
Message-ID: | <380-2200875189751856@cantv.net> |
Reply-To: | rodmedina AT cantv DOT net |
From: | "Rodrigo Medina" <rodmedina AT cantv DOT net> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: lpr works? FAQ in error? |
Date: | Fri, 18 Jul 2008 04:37:51 -0430 |
MIME-Version: | 1.0 |
X-Virus-Status: | Clean |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Lou Umscheid wrote >As a follow-up and clarification to my previous post, what I would like >to be able to do is to pipe output to a printer, e.g. > ls -l | lpr >This doesn't work for me as I explained previously. Using notepad /P >instead of lpr doesn't work either. Is there a simple way to do this? The problem with lpr is that it sends the file as it is to the printer, and modern printers require some kind of translation of the file to their own special language. You can send a text file to the printer using the windows program NOTEPAD /P For runnig notepad from a cygwin terminal you can use the command cygstart. For example cygstar notepad file.txt opens file.txt in notepad. cygstart notepad /P file.txt sends file.txt to the printer. The are 2 additional problems. Notepad prints Windows text files, with the CRLF line endings. If your file is a unix text file with LF endings you need first to pass the file through the unix2dos filter that is part of the cygutils. The other problem is that Notepad does not know about cygwin pipes, but you can make a bash script that passes the pipe input through the unix2dos filter, writes the result in a temporal file, prints the file with NOTEPAD /P and deletes the temporal file. RM -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |