I have an application that users use to submit information from a website. My code creates output files when the user is finished. I want to be able to see the content of these files as they are created, similar to the way `tail -f` works, but I don't know ahead of time what the filenames will be.
Is there a way to cat files as they are created or would I have to somehow create an endless loop that uses `find` with the `-newermt` flag
Something like this is the best I can come up with so far:
#!/bin/bash
# news.sh
while true
do
d=$(date +"%T Today")
sleep 10
find . -newermt "$d" -exec head {} +
done