#!/bin/bash # returns code 0 if backup is necessary, 1 otherwise while IFS= read -r file; do if [ ! -e "$file" ]; then exit 0 fi done