Answers for "zsh script check if file is found"

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
2

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