help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: modifying movemail


From: Florian von Savigny
Subject: Re: modifying movemail
Date: 20 Jun 2004 12:13:13 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Pascal Bourguignon <spam@thalassa.informatimago.com> writes:

> My script won't work 100% of the time.  It may work correctly 80% or
> never or anything betweek 0% and 100%.

I'll give it a try, hoping it works with my (simple)
setup. Regrettably, the news server seems to have discarded the
beginnings of this thread, and I have failed to save away your
script. Trying to re-write it from memory, I arrived at:

#!/bin/sh

echo $$ > "$1".lock

while [ -ne `cat "$1".lock` $$ ]
  do
  while [ -x "$1".lock ]
    do
    sleep 5
    done
  done

mv "$1" "$2"
rm "$1".lock


Was that correct? I am not sure, because that way I don't see how the
condition in the first "while" should ever become false (perhaps when
the echo in the first line fails?).



-- 


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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]