# # MHonArc & Aliases # # Examples assume ~/mhonarch is the directory in which mhonarch archives go, # ~/Mail is your mh mail directory, ~/mail is your mbox mail directory # To convert MH folders: alias mmh 'mhonarc -mh -outdir \!$ \!:1-' # EXAMPLE: To create a mhonarch archive combining mh mail folders F1 and F1 # and saving the result in ~/mhonarch/F1-2 : # mmh ~/Mail/F1 ~/Mail/F2 ~/mhonarch/F1-2 ##### # To convert mbox files: alias mmbox 'mhonarc -mbox -outdir \!$ \!:1-' # EXAMPLE: To create a mhonarch archive combining mail directories F1 and F1 # and saving the result in ~/mhonarch/F1-2 : # mmbox ~/mail/F1 ~/mail/F2 ~/mhonarch/F1-2 ##### # To convert a single message to html format: alias msing 'mhonarc -single < \!:1 > \!:2' # EXAMPLE: ~mhonarc/msg.html is the html format of ~/Mail/F1/1 # (a single mail message) # msing ~/Mail/F1/1 ~/mhonarc/msg.html ##### # To add MH messages to an existing archive: alias mmhadd 'mhonarc -mh -add -outdir \!$ < \!:1-' # EXAMPLE: messages ~/Mail/1, ~/Mail/2, ~/Mail/3 get added to # ~/mhonarc/F1 directory # mmhadd ~Mail/1 ~Mail/2 ~Mail/3 ~/mhonarc/F1 ##### # To add mailbox messages to an existing archive: # EXAMPLE: messages m1, m2, m3 get added to ~/mhonarc/F1 directory # mmboxadd m1 m2 m3 ~/mhonarc/F1 alias mmboxadd 'mhonarc -mbox -add -outdir \!$ < \!:1-' ##### # To add a single message to an existing MH archive: alias maddsing 'show -noshow -noheader \!:1 | mhonarc -add -outdir \!$' # EXAMPLE: message ~/Mail/1 gets added to ~/mhonarc/F1 directory # mmhadd ~/Mail/1 ~/mhonarc/F1 # maddsing ~/Mail/1 ~mhonarc/F1 ##### # To sort messgaes by subject: alias msubsort 'mhonarc -subsort -outdir \!$ \!:1-' # EXAMPLE: mh mail folders F1 and F2 will be combined and converted to # html mail archive and saved in ~/mhonarc/F1-2 directory by subject order. # subsort F1 F2 ~/mhonarc/F1-2 ##### # To archive messages by the order they appear (default is chronological): alias mnosort 'mhonarc -nosort -outdir \!$ \!:1-' # EXAMPLE: mh mail folders F1 and F2 will be combined and converted to # html mail archive and saved in ~/mhonarc/F1-2 directory by order they appear. # mnosort F1 F2 ~/mhonarc/F1-2 ##### # To sort messages by reverse chronological date (the default): alias mreverse 'mhonarc -reverse -outdir \!$ \!:1-' # EXAMPLE: mh mail folders F1 and F2 will be combined and converted to # html mail archive and saved in ~/mhonarc directory by reverse # chronological order. # mreverse F1 F2 ~/mhonarc ##### # To convert bulletin boards: alias mbb 'mhonarc -msgsep "^/^A" -mbox -outdir \!$ \!:1-' # Note: To enter ^A (hidden character, CTL-A) you must type CTL-V followed # by CTL-A. # EXAMPLE: To create a mhonarch archive combining mh mail folders F1 and F1 # and saving the result in ~/mhonarch/F1-2 : # mbb ~/Mail/F1 ~/Mail/F2 ~/mhonarch/F1-2 ##### # To get help on mhonarc: alias mhelp 'mhonarc -help | more' # EXAMPLE: mhelp displays the syntax, the command description, the command # options and version information page by page # mhelp # To scan an archive to obtain message numbers for removing messages alias mscan mhonarc -scan -nosort -noreverse # EXAMPLE: mscan # Lists the the messages in message number order starting from 0. # Without -nosort -noreverse options the messages are listed in # the same order as they are listed in the archive's index page. # To remove messages alias mrmm mhorac -rmm \!* # EXAMPLE: To remove archived messages 5, 27 and 38 you may type # the following from the archive directory: # mrmm 5 27 38 # NOTE that 5, 27 and 38 are numbers that can be obtained using # mscan alias above. # NOTE that messages will be removed from ./maillist.html.