Answers for "zsh shell check if file exists"

12

check if file exists bash

FILE=/etc/resolv.conf
if [ -f "$FILE" ]; then
    echo "$FILE exists."
else 
    echo "$FILE does not exist."
fi
Posted by: Guest on October-23-2020
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

Code answers related to "TypeScript"

Browse Popular Code Answers by Language