Kaloudoff Olivier wrote:
On 5 Nov, you wrote:
I am developping a small shell script that would take
great advantage of the FAM system... but I can't see nowhere
on the list nor on the web no tool to play with FAM at a shell level.
Is there anyone working on this project at this time ?
Try:
http://fileschanged.sourceforge.net/
but this filechanged utility looses all benefits of the FAM system.
What I need is a tool much like procmail uses to lock files;
- my shell script would call, for example "/usr/bin/fam-wait filename " , a
call
that would block until the file has been changed.
Not exactly blocking, but you can do almost that with a simple while
loop as in the examples on the fileschanged page:
./fileschanged -f some_file | while read file; do # semi-blocking
echo $file ...
done
Ok, I'll try to write cut and paste some C code to get this behaviour ...
(I wish I was a C programmer)
I hacked a few features into the fam-tutorial code to do some stuff I
wanted it to. Quite easy (and I am no C expert...)
Long url follows:
http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/0650/bks/SGI_Developer/books/IIDsktp_IG/sgi_html/ch08.html#LE45453-PARENT
|