Re: Maildir format
"clemens fischer" <[email protected]> 27 May 2003 16:18:11 +0200
| Newsgroups | gmane.mail.ifile.general |
|---|---|
| Message-ID | <[email protected]> |
"Karl Vogel" <[email protected]>: > #!/bin/perl > # update-header -- read file and msg type, add ifile header. > > while (<>) > { > chomp; > ($file, $type) = split; > > # store entire message > open (F, "< $file") || die "can't read $file"; > $_ = do { local $/; <F> }; > close (F); > > # find end of header > $nl = index ($_, "\n\n"); > die "no blank line" if $nl < 0; > >> me% ifile -c -q ??? | update-header AFAIK "ifile -c" doesn't print the entire message, only the classifications itself. thus your perl script will only get to see categories. you might want to show the ifile options and the shell comand line this script is supposed to handle. also, the script still has no locking against multiple invocations on the same message. i think avoiding in-situ message changes will make things much easier. clemens