|> A pair of MOUNT parameters:
|> MOUNT="toto_* pop://email@example.com"
|> MOUNT="//titi.com/toto_* pop://firstname.lastname@example.org"
|> will do.
|The problem here is that the 'toto' part can change too. In fact I would like the above rewrites to work for any 'toto' and any 'stuff'.
I think I've got a clearly specified requirement at last, but
it might be extended yet :)
Another mechanism for arbitrary rewriting in completely user
defined way, external filter, may be desirable.
Basically canonuser-filter for requirements can be realized with
sed like this:
sed -e '/^USER[^@]*$/s/^Memail@example.com&/' -e '/^USER/s/_.*@/@/'
(^M must be raw carriage-return to work)
But this will no work except we can disable its buffering for
standard output. A possible solution is using sed line by line
while read LINE; do
echo "$LINE" \
| sed -e '/^USER[^@]*$/s/^Mfirstname.lastname@example.org&/' -e '/^USER/s/_.*@/@/'
Yutaka Sato <email@example.com> http://www.delegate.org/~ysato/ @ @
Computer Science Division, Electrotechnical Laboratory ( - )
1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan _< >_