On Wed, Jul 10, 2002 at 10:40:16AM -0400, John P Verel wrote: > I have antiword set up as my mailcap entry for viewing MSWord docs and > it works great (thanks Sven :). What I'd also like to do, from time to > time, is pipe a *.doc to AbiWord. The problem is that piping and opening attachments work via different mechanisms. Piping uses the UNIX concept of pipes, which is where it gets its name, and you can't pipe to AbiWord. While many UNIX commands are written to operate as a filter - reading from their standard input instead of from a named file - AbiWord is not.
When you open an attachment, the attachment first gets saved to a file on disk with some temporary name (like /tmp/foo.doc). In the command from your mailcap, %s is then replaced with that filename before the command is executed. So what ends up being run is, for example, this: abiword /tmp/foo.doc But when you pipe to a command, the attachment isn't saved first. Mutt just runs the command and then sends the data to it on its standard input. It's as if you had typed just the command with no arguments: abiword and then started typing the contents of the attachment on your keyboard. If you try to pipe to "abiword %s" then it just runs that command literally, and abiword tries to open a file named '%s' and can't find it. Like you, I have antiword set up for everyday .doc reading, and fire up AbiWord when antiword isn't enough. But I just save the attachment and then run abiword on it: s filename !abiword filename -- Mark REED | CNN Internet Technology 1 CNN Center Rm SW0831G | [EMAIL PROTECTED] Atlanta, GA 30348 USA | +1 404 827 4754 -- I can give you my word, but I know what it's worth and you don't. -- Nero Wolfe, "Over My Dead Body"