Subject: Re: How to handle lots of rcfile arguments on the
getmail command line?



cl@xxxxxxxx <cl@xxxxxxxx> wrote:
> Are there any 'elegant' ways of handling lots of rcfile arguments?

Something like this as getmail-runner.sh:

#!/bin/sh
cd ~/.getmail
rcfiles=""
for file in rc-* ; do
rcfiles="$rcfiles -r ${file}"
done
exec /path/to/getmail $@ $rcfiles

Simply make sure all your getmailrc files are in ~/.getmail and are named
"rc-whatever" (with no spaces in the filenames). Then invoke
getmail-runner.sh instead of getmail directly; any options given to it will be
passed to getmail, and the script will automatically add all the "-r rcfile"
arguments.

This is Unix -- anything repetitive you're doing manually is a big cluebat
saying "use a script here".

Charles
--
-----------------------------------------------------------------------
Charles Cazabon <getmaillist@xxxxxxxxxxxxxxxxxxxx>
GPL'ed software available at: http://pyropus.ca/software/
-----------------------------------------------------------------------

---------------------------------------------------------------------
Please DO NOT top-post in messages to this (or any) mailing list.
To unsubscribe, e-mail: getmail-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: getmail-help@xxxxxxxxxxxxxxxxxxxxxx






Programming list archiving by: Enterprise Git Hosting