[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mutt-users
Subject:    How to make mutt execute commands from the command line?
From:       Marco Fioretti <mfioretti () mclink ! it>
Date:       2006-11-08 14:07:32
Message-ID: 1.3.200611081507.29971 () mclink ! it
[Download RAW message or body]

Hello,

I need to migrate with a script lots of mailboxes from one place and format
to another. For several reasons (I *have* looked at mb2md and similar)
mutt seems the best way for me to do it, or at least I'm really
interested to learn if mutt can do it and how.

What I need to do is, more or less, inside a bash loop:

mutt -f $ORIG_MBOX -e "COMMAND_TO_SAVE_ALL_MESSAGES_TO_A_MAILDIR"

where both the original and destination mailbox are calculated on the fly.

I thought the command should be something like 

  <tag-pattern>.<enter><tag-prefix><copy-message>PATH_TO_MAILDIR/<enter>

but if I try to run this at the prompt:

mutt -f test_in -e 'tag-pattern>.<enter><tag-prefix><copy-message>test_out/<enter>'

all I get is:

Error in command line: tag-pattern>.<enter><tag-prefix><copy-message>bingo/<enter>: unknown command

as far as I understand, I am missing something silly like correct quoting or similar,
but what is it? I have tried several variations of the command above without success.

Or maybe I should launch mutt in a completely different way?

THank you in advance for any feedback,

              Marco


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic