Tuesday, March 3, 2020

bash: check if file exists

FILE="/etc/resolv.conf"
if [[ -f "${FILE}" ]]; then
   echo "${FILE} exist"
fi

No comments:

Post a Comment