fam
[Top] [All Lists]

Re: Shell interface to fam ?

To: Kaloudoff Olivier <kaloudoff@xxxxxxxxxx>
Subject: Re: Shell interface to fam ?
From: Martin Wickman <martin@xxxxxxxxxxx>
Date: Wed, 06 Nov 2002 17:36:58 +0100
Cc: fam@xxxxxxxxxxx
References: <OF875FAFC0.C363F8E1-ONC1256C69.004E54DF@xxxxxxxxxx>
Sender: fam-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827
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






<Prev in Thread] Current Thread [Next in Thread>