178 lines
4.4 KiB
HTML
178 lines
4.4 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of RUN-MAILCAP</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>RUN-MAILCAP</H1>
|
|
Section: Run Mailcap Programs (1)<BR>Updated: 1st Jan 2008<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
run-mailcap, view, see, edit, compose, print - execute programs via entries in the
|
|
<I>mailcap</I>
|
|
|
|
file
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>run-mailcap</B>
|
|
|
|
--action=ACTION [--option[=value]]
|
|
[MIME-TYPE:[ENCODING:]]FILE [...]
|
|
<P>
|
|
The
|
|
<B>see</B>,
|
|
|
|
<B>edit</B>,
|
|
|
|
<B>compose</B>
|
|
|
|
and
|
|
<B>print</B>
|
|
|
|
versions are just aliases that default to the view, edit, compose, and
|
|
print actions (respectively).
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<B>run-mailcap</B>
|
|
|
|
(or any of its aliases) will use the given action to process each
|
|
mime-type/file in turn. Each file is specified as its mime-type,
|
|
its encoding (e.g. compression), and filename together, separated by
|
|
colons. If the mime-type is omitted, an attempt to determine the type
|
|
is made by trying to match the file's extension with those in the
|
|
<I>mime.types</I>
|
|
|
|
files. If no mime-type is found, a last attempt will be done by
|
|
running the
|
|
<B>file</B>
|
|
|
|
command, if available. If the encoding is omitted, it will also be
|
|
determined from the file's extensions. Currently supported encodings
|
|
are
|
|
<B>gzip</B>
|
|
|
|
(.gz),
|
|
<B>bzip2</B>
|
|
|
|
(.bz2),
|
|
<B>xz</B>
|
|
|
|
(.xz), and
|
|
<B>compress</B>
|
|
|
|
(.Z). A filename of "-" can be used to mean "standard input", but
|
|
then a mime-type
|
|
<B>must</B>
|
|
|
|
be specified.
|
|
<P>
|
|
Both the user's files (~/.mailcap; ~/.mime.types) and the system files
|
|
(/etc/mailcap; /etc/mime.types) are searched in turn for information.
|
|
<A NAME="lbAE"> </A>
|
|
<H3>EXAMPLES</H3>
|
|
|
|
<BR> see picture.jpg
|
|
<BR> print output.ps.gz
|
|
<BR> compose text/html:index.htm
|
|
<BR> extract-mail-attachment msg.txt | see image/tiff:gzip:-
|
|
<A NAME="lbAF"> </A>
|
|
<H3>OPTIONS</H3>
|
|
|
|
All options are in the form --<opt>=<value>.
|
|
<DL COMPACT>
|
|
<DT id="1"><B>--action=<action></B>
|
|
|
|
<DD>
|
|
Performs the specified action on the files. Valid actions are
|
|
<I>view</I>,
|
|
|
|
<I>cat</I>
|
|
|
|
(uses only "copiousoutput" rules and sends output to STDOUT) ,
|
|
<I>compose</I>,
|
|
|
|
<I>composetyped</I>,
|
|
|
|
<I>edit</I>
|
|
|
|
and
|
|
<I>print</I>.
|
|
|
|
If no action is specified, the action will be determined by how the
|
|
program was called.
|
|
<DT id="2"><B>--debug</B>
|
|
|
|
<DD>
|
|
Turns on extra information to find out what is happening.
|
|
<DT id="3"><B>--nopager</B>
|
|
|
|
<DD>
|
|
Ignores any "copiousoutput" directive and sends output to STDOUT.
|
|
<DT id="4"><B>--norun</B>
|
|
|
|
<DD>
|
|
Displays the found command without actually executing it.
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SECURITY</H2>
|
|
|
|
A temporary copy of the file is opened if the file name matches the Perl
|
|
regular expression "[^[:alnum:],.:/@%^+=_-]", in order to protect from the
|
|
injection of shell commands, and to make sure that the name can always be
|
|
displayed in the current locale. In addition, the file is opened using its
|
|
absolute path to prevent the injection of command-line arguments, for instance
|
|
using file names starting with dashes.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+file">file</A></B>(1)
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+mailcap">mailcap</A></B>(5)
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+mailcap.order">mailcap.order</A></B>(5)
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+update-mime">update-mime</A></B>(8)
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<B>run-mailcap</B>
|
|
|
|
(and its aliases) was written by Brian White <<A HREF="mailto:bcwhite@pobox.com">bcwhite@pobox.com</A>>.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
<B>run-mailcap</B>
|
|
|
|
(and its aliases) is in the public domain (the only true "free").
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="5"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="6"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="7"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DL>
|
|
<DT id="8"><A HREF="#lbAE">EXAMPLES</A><DD>
|
|
<DT id="9"><A HREF="#lbAF">OPTIONS</A><DD>
|
|
</DL>
|
|
<DT id="10"><A HREF="#lbAG">SECURITY</A><DD>
|
|
<DT id="11"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
<DT id="12"><A HREF="#lbAI">AUTHOR</A><DD>
|
|
<DT id="13"><A HREF="#lbAJ">COPYRIGHT</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:26 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|