Sometime today, Linux @ Ramshyam wrote:
Can a shell script contiuously poll for a specific file in a specified directory, and upon finding such a file, execute some commands.
Yes, perhaps you should send the script into an infinite loop which only exits when it finds the file to exist. Here's a bad way of doing it -
while [ ! -f tmp.txt ]; do : done echo "File found... executing commands."
A better way would be to let it sleep for some time between successive polls.
Manish