#!/usr/bin/tclsh
puts [package require inotify]

puts Instance:[inotify create watch handler]

proc handler {fd} {
    puts [watch read]
}

exec touch 132.txt
watch add 132.txt {*}

set a 0
while {1} {
    exec echo 1 >> 132.txt
    puts [inotify info]
    puts [watch info]
    puts [watch queue]
    after 20 set a 1
    vwait a
}
