Answers for "zsh check if file exists"

1

zsh check if file exists

if [ ! -f /tmp/foo.txt ]; then
    echo "File not found!" >&2
    exit 1
fi
Posted by: Guest on May-10-2021
1

zsh check if file exists

FILE=/etc/resolv.conf
if [[ -f "$FILE" ]]; then
    echo "$FILE exists."
fi
Posted by: Guest on July-02-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language