#!/bin/bash # A simple utility that waits for a file to become available, infinitely FILE=$@ while [ ! -f "$FILE" ] do sleep 0.1 done echo $FILE