#!/bin/bash # returns code 0 if backup is necessary, 1 otherwise eval "$DIRS_TO_BACKUP_STR" for file in "${DIRS_TO_BACKUP[@]}"; do if [ ! -e "$file" ]; then exit 0 fi done exit 1