Thanks!

I *THOUGHT* I remembered there was a simple way of doing it in Linux --
just couldn't remember what that way was!  That should do PRECISELY what I
need.  Another of the wonders of /proc!!

         pete

> From [EMAIL PROTECTED]  Thu Apr  6 10:52:21 2000
> To: Pete Peterson <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: making <command> [options] <infile> <outfile> work with STDIN/STDOUT
> 
> On Thu, 6 Apr 2000, Pete Peterson wrote:
> 
> > I can do"
> >   ps2pdf -r300 -g3300x5100 infile.ps outfile.pdf
> > 
> > But I'd really like to have a FILTER that might do something like:
> > 
> > program_making_ps | postscript2pdf [opts] | uuencode widget.pdf | mail whoever
> > 
> > Obviously, I could make "postscript2pdf" be a script that wrote STDIN to a
> > temp file, ran ps2pdf to create another temp file, output that to STDOUT,
> > and deleted the temp file, but I thought I remembered there was some less
> > ugly way to accomplish that with a wrapper that didn't involve creating
> > temporary files.
> > 
> 
> I don't know if its the method you remeber or not but a program's stdio
> can be address as files (on linux anyway) as /proc/self/fd/{0,1,2}.  So
> you could something like...
> 
>       ps2pdf -r300 -g3300x5100 /proc/self/fd/0 /proc/self/fd/1
> 
> ... which is kind of a round about way of telling ps2pdf to read from
> stdin and write to stdout.
> 
> M.


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to