Answers for "check if file is open, bash"

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

bash check file exists

if [ -f "myFile.txt" ]; then
  echo "File found"
fi

if ! [ -f "myFile.txt" ]; then
  echo "File not found"
fi
Posted by: Guest on October-29-2021

Code answers related to "check if file is open, bash"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language