📄 mhn.man
字号:
MHN(1) BSD Reference Manual MHN(1)NNAAMMEE mhn - multi-media MHSSYYNNOOPPSSIISS mhn [[+folder] [msgs] | [-file file]] [-part number]... [-type content]... [-list [-headers] [-noheaders] [-realsize] [-norealsize]] [-nolist] [-show [-serialonly] [-noserialonly] [-form formfile] [-pause] [-nopause]] [-noshow] [-store [-auto] [-noauto]] [-nostore] [-cache] [-nocache] [-rcache policy] [-wcache policy] [-check] [-nocheck] [-ebcdicsafe] [-noebcdicsafe] [-rfc934mode] [-norfc934mode] [-verbose] [-noverbose] [-help]DDEESSCCRRIIPPTTIIOONN The _m_h_n command manipulates multi-media messages as speci- fied in RFC 1521. Four action switches direct the operation of _m_h_n, namely `-list', `-show', `-store', and `-cache'. Any of these switches may be used concurrently. Normally these action switches will operate on the content of each of the named messages. However, by using the `-part' and `-type' switches, the scope of the operation can be focused on particular subparts (of a multipart content) and/or par- ticular content types. A part specification consists of a series of numbers sepa- rated by dots. For example, in a multipart content con- taining three parts, these would be named as 1, 2, and 3, respectively. If part 2 was also a multipart content con- taining two parts, these would be named as 2.1 and 2.2, respectively. Note that the `-part' switch is effective for only messages containing a multipart content. If a message has some other kind of content, or if the part is itself another multipart content, the `-part' switch will not prevent the content from being acted upon. A content specification consists of a content type and a subtype. The initial list of "standard" content types and[mh.6] MH.6.8 1MHN(1) BSD Reference Manual MHN(1) subtypes can be found in RFC 1521. A list of commonly used contents is briefly reproduced here: Type Subtypes ---- -------- text plain multipart mixed, alternative, digest, parallel message rfc822, partial, external-body application octet-stream, postscript image jpeg, gif, x-pbm, x-pgm, x-ppm, x-xwd audio basic video mpeg Subtypes are mandatory. To specify a content, regardless of its subtype, just use the name of the content, e.g., "audio". To specify a spe- cific subtype, separate the two with a slash, e.g., "audio/basic". Note that regardless of the values given to the `-type' switch, a multipart content (of any subtype listed above) is always acted upon. Further note that if the `-type' switch is used, and it is desirable to act on a message/external-body content, then the `-type' switch must be used twice: once for message/external-body and once for the content externally referenced. Each content may optionally have an integrity check asso- ciated with it. If present and the `-check' switch is given, then _m_h_n will attempt to verify the integrity of the content. The option `-file file' directs _m_h_n to use the specified file as the source message, rather than a message from a folder. Note that the file should be a validly formatted message, just like any other _M_H message. It should NNOOTT be in mail drop format (to convert a file in mail drop format to a folder of _M_H messages, see _i_n_c (1)). LLiissttiinngg tthhee CCoonntteennttss The `-list' switch tells _m_h_n to list the table of contents associated with the named messages. The `-headers' switch indicates that a one-line banner should be displayed above the listing. The `-realsize' switch tells _m_h_n to evaluate the "native" (decoded) format of each content prior to listing. This provides an accurate count at the expense of a small delay.[mh.6] MH.6.8 2MHN(1) BSD Reference Manual MHN(1) SShhoowwiinngg tthhee CCoonntteennttss The `-show' switch tells _m_h_n to display the contents of the named messages. The headers of the message are dis- played with the _m_h_l_p_r_o_c, using format file _m_h_l_._h_e_a_d_e_r_s. (The choice of format file can be overridden by the `-form formfile' switch.) _m_h_n will look for information in the user's profile to determine how the different contents should be displayed. This is accomplished by consulting a display string, and executing it under //bbiinn//sshh, with the standard input set to the content. The display string may contain these escapes: %a additional arguments %e exclusive execution %f filename containing content %F %e, %f, and stdin is terminal not content %l display listing prior to displaying content %p %l, and ask for confirmation %s subtype %d content description For those display strings containing the e- or F-escape, _m_h_n will execute at most one of these at any given time. Although the F-escape expands to be the filename contain- ing the content, the e-escape has no expansion as far as the shell is concerned. When the p-escape prompts for confirmation, typing INTR (usually control-C) will tell _m_h_n not to display that con- tent. (The p-escape can be disabled by specifying `-nopause'.) Further, when _m_h_n is display a content, typ- ing QUIT (usually control-\) will tell _m_h_n to wrap things up immediately. Note that if the content being displayed is multipart, but not one of the subtypes listed above, then the f- and F- escapes expand to multiple filenames, one for each subor- dinate content. Further, stdin is not redirected from the terminal to the content. First, _m_h_n will look for an entry of the form: mhn-show-<type>/<subtype> to determine the command to use to display the content. If this isn't found, _m_h_n will look for an entry of the form: mhn-show-<type>[mh.6] MH.6.8 3MHN(1) BSD Reference Manual MHN(1) to determine the display command. If this isn't found, _m_h_n has two default values: mhn-show-text/plain: %pmoreproc '%F' mhn-show-message/rfc822: %pshow -file '%F' If neither apply, _m_h_n will check to see if the message has a application/octet-stream content with parameter "type=tar". If so, _m_h_n will use an appropriate command. If not, _m_h_n will complain. Example entries might be: mhn-show-audio/basic: raw2audio 2>/dev/null | play mhn-show-image: xv '%f' mhn-show-application/PostScript: lpr -Pps Note that when using the f- or F-escape, it's a good idea to use single-quotes around the escape. This prevents misinterpretation by the shell of any funny characters that might be present in the filename. Because the text content might be in a non-ASCII character set, when _m_h_n encounters a "charset" parameter for this content, it checks to see whether the environment variable $MM_CHARSET is set and whether the value of this environ- ment variable is equal to the value of the charset parame- ter. If not, then _m_h_n will look for an entry of the form: mhn-charset-<charset> which should contain a command creating an environment to render the character set. This command string should con- taining a single "%s", which will be filled-in with the command to display the content. An example entry might be: mhn-charset-iso-8859-1: xterm -fn '-*-*-medium-r- normal-*-*-120-*-*-c-*-iso8859-*' -e %s Note that many pagination programs strip off the high- order bit. However, newer releases of the _l_e_s_s program have modest support for single-octet character sets. The source to _l_e_s_s version 177, which has such support, is found in the MH source tree under mmiisscceellllaannyy//lleessss--117777. In order to view messages sent in the ISO 8859/1 character[mh.6] MH.6.8 4MHN(1) BSD Reference Manual MHN(1) set using _l_e_s_s, put these lines in your .login file: setenv LESSCHARSET latin1 setenv LESS "-f" The first line tells _l_e_s_s to use 8859/1 definition for determing whether a character is "normal", "control", or "binary". The second line tells _l_e_s_s not to warn you if it encounters a file that has non-ASCII characters. Then, simply set the mmoorreepprroocc profile entry to _l_e_s_s, and it will get called automatically. (To handle other single-octet character sets, look at the _l_e_s_s (1) manual entry for information about the LLEESSSSCCHHAARRDDEEFF environment variable.) Finally, _m_h_n will process each message serially -- it won't start showing the next message until all the com- mands executed to display the current message have termi- nated. In the case of a multipart content (of any subtype listed above), the content contains advice indicating if the parts should be displayed serially or in parallel. Because this may cause confusion, particularly on uni- window displays, the `-serialonly' switch can be given to tell _m_h_n to never display parts in parallel. SSttoorriinngg tthhee CCoonntteennttss The `-store' switch tells _m_h_n to store the contents of the named messages in "native" (decoded) format. Two things must be determined: the directory to store the content, and the filenames. Files are written in the directory given by the mmhhnn--ssttoorraaggee profile entry, e.g., mhn-storage: /tmp If this entry isn't present, the current working directory is used. _m_h_n will look for information in the user's profile to determine how the different contents should be stored.[mh.6] MH.6.8 5MHN(1) BSD Reference Manual MHN(1) This is achieved through the use of a formatting string, which may contain these escapes: %m message number %P .part %p part %s subtype If the content isn't part of a multipart (of any subtype listed above) content, the p-escapes are ignored. Note that if the formatting string starts with a "+" character, then these escapes are ignored, and the content is stored in the named folder. (A formatting string consisting solely of a "+" character indicates the current folder.) Further, a formatting string consisting solely of a "-" character indicates the standard-output. First, _m_h_n will look for an entry of the form: mhn-store-<type>/<subtype> to determine the formatting string. If this isn't found, _m_h_n will look for an entry of the form: mhn-store-<type> to determine the formatting string. If this isn't found, _m_h_n will check to see if the content is application/octet- stream with parameter "type=tar". If so, _m_h_n will choose an appropriate filename. If the content is not applica- tion/octet-stream, then _m_h_n will check to see if the con- tent is a message. If so, _m_h_n will use the value "+". If not, _m_h_n will use the value "%m%P.%s". Note that if the formatting string starts with a '/', then content will be stored in the full path given (rather than using the value of mmhhnn--ssttoorraaggee or the current working directory.) Similarly, if the formatting string starts with a '|', then _m_h_n will execute a command which should ultimately store the content. Note that before executing the command, _m_h_n will change to the appropriate directory. Also note that if the formatting string starts with a '|', then _m_h_n will also honor the a-escape when processing the formatting string.[mh.6] MH.6.8 6
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -