From owner-freebsd-questions@FreeBSD.ORG Tue Apr 5 16:33:29 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8271D16A5C3 for ; Tue, 5 Apr 2005 16:33:29 +0000 (GMT) Received: from Gina.esfm.ipn.mx (esfm.ipn.mx [148.204.102.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7A6443D4C for ; Tue, 5 Apr 2005 16:33:28 +0000 (GMT) (envelope-from mrspock@esfm.ipn.mx) Received: from mail.esfm.ipn.mx (Gina.esfm.ipn.mx [148.204.102.61]) by Gina.esfm.ipn.mx (8.13.1/8.13.1) with ESMTP id j35GW16a004512 for ; Tue, 5 Apr 2005 11:32:01 -0500 (CDT) (envelope-from mrspock@esfm.ipn.mx) Received: from 201.135.130.41 (SquirrelMail authenticated user mrspock); by mail.esfm.ipn.mx with HTTP; Tue, 5 Apr 2005 11:32:01 -0500 (CDT) Message-ID: <63501.201.135.130.41.1112718721.squirrel@201.135.130.41> Date: Tue, 5 Apr 2005 11:32:01 -0500 (CDT) From: mrspock@esfm.ipn.mx To: freebsd-questions@freebsd.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: shell question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2005 16:33:29 -0000 Hello FreeBSD gurus! I address you in hope of enlightment. Here is the problem: I have a program that creates a PostScript output and writes it to its standard output. This program also writes diagnostic messages to the standard error output at the same time, in this case the messages are written in plain text. I need to concatenate the standard output and then standard error output in a file, but I need to convert the standard output into PostScript before the concatenation. program stdout 2> stderr cat stdout > out a2ps stdout >> out a2ps is in the ports and it converts plain text into PostScript. The problem is that I don't want to use the temporary file that I used above (stdout, stderr, out), I just want a "filter" In a diagram, it can be seen as: stdin ==> program ==> [stdout, a2ps(stderr)] I have tried: cat stdin | program 2> tmp | ( cat && a2ps tmp ) but I still need a temporary file. Can it be done? Can you help me and tell me how ? Thanks in advance. -Eduardo. PS. Please, answer to my e-mail address, I am not subscribed to the list.