Two simple solutions:
-
Execute your code once before the while loop
actions() { check_if_file_present # Do other stuff } actions #1st execution while [ current_time <= $cutoff ]; do actions # Loop execution done
-
Or:
while : ; do actions [[ current_time <= $cutoff ]] || break done