Re: inotifywait man page--possible error

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

 



Hello Tom,

thank you for your report. Actually, this example is correct as it is. Did you copy it verbatim?
If you replace "while" by "until", the script will stop after inotifywait returns without entering the
body loop. With "while", it will enter the body loop and then, restart from inotifywait until
another modification occurs.

Of course, the script does have problems for practical use such as the fact that while
you are in the body loop, you're not watching the file anymore, and there is a race condition
which could make you miss apache events but that's because it's just a toy example.

Laurent


Le 12/02/2015 02:54, Tom Canavan a écrit :
> I noticed a problem with example no. 2 at toward the bottom of the page.  I 
> tried and tried to get this to work.  It would not.  Then I replaced the word 
> "while" with the word "until".  Then it works.  Sorry to trouble you.  I'm 
> just a beginner at scripting, and this may not be an error at all, and might 
> somehow be my fault.    Forgive me if I am wrong.  I am only relating what 
> happened on *my* system I'm using Fedora 18.  My only goal in writing you to 
> possibly save some other beginner a headache if it *is* a mistake.
>
> Tom
> --
> To unsubscribe from this list: send the line "unsubscribe linux-man" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux