linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* inotifywait man page--possible error
@ 2015-02-12  1:54 Tom Canavan
  2015-02-12  7:33 ` Michael Kerrisk (man-pages)
  2015-02-12  8:10 ` Laurent Georget
  0 siblings, 2 replies; 3+ messages in thread
From: Tom Canavan @ 2015-02-12  1:54 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: inotifywait man page--possible error
  2015-02-12  1:54 inotifywait man page--possible error Tom Canavan
@ 2015-02-12  7:33 ` Michael Kerrisk (man-pages)
  2015-02-12  8:10 ` Laurent Georget
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Kerrisk (man-pages) @ 2015-02-12  7:33 UTC (permalink / raw)
  To: Tom Canavan; +Cc: linux-man

Hi Tom,

On 12 February 2015 at 02:54, Tom Canavan <tmscanavan-Lh2ygAtTN0NSV923RJcDwA@public.gmane.org> wrote:
> 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.

Offhand, I am not sure what is the cause of the problem, in part
because you don't explain what you mean by "doesn't work". But in any
case, this isn't a page maintained by the man-pages project. For
details of who to contact, see
http://man7.org/linux/man-pages/man1/inotifywait.1.html#COLOPHON

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: inotifywait man page--possible error
  2015-02-12  1:54 inotifywait man page--possible error Tom Canavan
  2015-02-12  7:33 ` Michael Kerrisk (man-pages)
@ 2015-02-12  8:10 ` Laurent Georget
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Georget @ 2015-02-12  8:10 UTC (permalink / raw)
  To: Tom Canavan; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-12  8:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-12  1:54 inotifywait man page--possible error Tom Canavan
2015-02-12  7:33 ` Michael Kerrisk (man-pages)
2015-02-12  8:10 ` Laurent Georget

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).