[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: modifying movemail
From: |
Florian von Savigny |
Subject: |
Re: modifying movemail |
Date: |
19 Jun 2004 23:54:25 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Pascal Bourguignon <spam@thalassa.informatimago.com> writes:
> #!/bin/bash
> echo $$ > "$1".lock
> while [ `cat "$1".lock` -ne "$$" ] ; do
> while [ -x "$1".lock ] ; do
> sleep 5
> done
> echo $$ > "$1".lock
> done
.
.
.
> rm "$1".lock
> #### movemail -- 2003-10-27 01:10:45 -- pascal ####
Thanks for this quick and simple poor man's file-locking mechanism,
Pascal, which I find quite charming (and couldn't have thought of) and
hadn't hoped for at all.
I fear, however, that the following is a bit less than what movemail
is expected to do:
> mv "$1" "$2"
as it does not overwrite the target Rmail file, but append to it while
emptying the spool file. So I suppose s.th like
cat "$1" >> "$2"
echo "" > "$1"
should do it. But movemail also converts Unix mbox format to Babyl
format on the fly (or have they switched to mbox as internal Rmail
format in the meantime? I read they were planning it.). How to achieve
that?
[BTW, I seem to have been less than clear about one thing: the movemail
I need to modify is the one to run under Linux, not the one that runs
under Windows. That has to deal with FAT32 anyway, thus should be able
to do the trick (though I haven't yet tested it--brrr...). But this
does not interfere with the usefulness of your solution.]
So thanks a lot - but is anybody able to help with the conversion (or
supply a pointer to the right information)?
--
Florian v. Savigny
If you are going to reply in private, please be patient, as I only
check for mail something like once a week. - Si vous allez répondre
personellement, patientez s.v.p., car je ne lis les courriels
qu'environ une fois par semaine.
- modifying movemail, Florian von Savigny, 2004/06/29
- Re: modifying movemail, Pascal Bourguignon, 2004/06/29
- Re: modifying movemail, Florian von Savigny, 2004/06/29
- Re: modifying movemail, Pascal Bourguignon, 2004/06/29
- Re: modifying movemail, Thien-Thi Nguyen, 2004/06/29