zsh periksa apakah ada file
if [ ! -f /tmp/foo.txt ]; then
echo "File not found!" >&2
exit 1
fi
Fine Falcon
if [ ! -f /tmp/foo.txt ]; then
echo "File not found!" >&2
exit 1
fi
FILE=/etc/resolv.conf
if [[ -f "$FILE" ]]; then
echo "$FILE exists."
fi