Re: mailcap
On Sun, Oct 01, 2006 at 01:47:04PM +0200, Christian Ebert wrote:
> * Bob Proulx on Sunday, October 01, 2006 at 00:57:46 -0600:
> > Oh very good! I had not known about pdftotext before. But looking at
> > it I see that it requires an input file as a file and won't read
> > stdin.
>
> $ grep pdftotext ~/.mailcap
> application/pdf; pdftotext -layout %s -; copiousoutput
BTW if you do need to use standard input for some reason, some Unix
systems have a /dev/stdin which is basically a filesystem alias for it:
pdftotext -layout /dev/stdin - < file.pdf
Depending on the system, /dev/fd/0 or /proc/self/fd/0 can be used the
same way.
-Dave Dodge