When you run inotifywait once (without the -m flag), you can easily use xargs :
inotifywait -r --format '%w%f' -e create /test -q | xargs /bin/rm
which will wait for the file to be created in / test, specify the file name for xargs and give this argument /bin/rmto delete the file, then it will exit.
( -m inotifywait), script :
inotifywait -m -r --format '%w%f' -e create /test | while read FILE
do
/bin/rm $FILE
done
, / , .