Something like this should do what you are looking for: while true do file=$(inotifywait -e create --format %f -r /watch/dir) && cat $(file) done