bash file exists conditional code example Example: bash script if file exists [ -f /etc/resolv.conf ] && echo "$FILE exists."