shell question

Björn König bkoenig at cs.tu-berlin.de
Tue Apr 5 10:26:28 PDT 2005


mrspock at esfm dot ipn dot mx wrote:

> 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 <stdin >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"

program < stdin 3>&1 1>&2 2>&3 | a2ps

Regards Björn



More information about the freebsd-questions mailing list