On Wed, 26 Dec 2001, Charles Jie wrote:

> In my .mailcap:
>
>     text/html;  mozilla -remote openurl\(file:%s\)
>
>     always fails because %s is expanded as '....'
>
> The quotes are the problem because they mix up in the URL.

How about this?

text/html;  mozilla -remote openurl\(file:`echo %s | sed "s/^'\(.*\)'$/\1/"`\)

sed "s/^'\(.*\)'$/\1/" will read 'something' from standard input and write
it to standard output without the single quotes.

Reply via email to