On 22Oct2008 14:15, Erik Hahn <erik_hahn@replyto.invalid> wrote:
| > ... And the xargs? For why?
|
| To replace newslines by spaces.

A "tr '\012' ' '" would be much better.

But normally this would not be needed anyway (certainly not in a shell
script in most circumstances, and I presume not in a muttrc; mutt's
"command ending (semicolon/newline)" parsing should already have
happened, as in the shell, and the newlines will be treated like any
other whitespace - as a word separator).

| I didn't know -printf at that time hence
| I had to use sed and xargs.

The sed is just fine. The xargs seems... strange. And it's much abused in the
wild, so I am always enthusiastic to discourage it when not useful. You
could, if desperate, put the tr inside the sed using the y/ command.

| > What about this:
| >
| > mailboxes `find * -type d \( -name cur -o -name new -o -name tmp \) -prune -o -type d ! \( -name cur -o -name new -o -name tmp \) -print | sed 's/^/+/'`
| >
| > Wordier, but much much faster if you have a non-trivial amount of
| > folders and messages. The -prune is especially important.
|
| So far I can't notice any difference but that's because I haven't
| imported my old messages into mutt.
|
| However, I like to have my mailboxes sorted in alphabetic order hence I
| now have "-printf '+%p\n' | sort | xargs" in the end. That doesn't look
| clean either.

Toss the xargs. The sort is necessary.
--
Cameron Simpson <cs@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

Are you experiencing more Windows95 crashes than the norm? How on earth
would you _know_? - John Brook <johnb@research.canon.com.au>
reporting about a new virus