Answers for ""sh" if file exists then"

C#
12

.sh script: check if file exist

#!/bin/bash
if [ -e x.txt ]
then
    echo "ok"
else
    echo "nok"
fi
Posted by: Guest on March-24-2020
-1

bash script if file exists

[ -f /etc/resolv.conf ] && echo "$FILE exists."
Posted by: Guest on February-26-2021

Code answers related to ""sh" if file exists then"

C# Answers by Framework

Browse Popular Code Answers by Language