Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

.sh script: check if file exist

#!/bin/bash
if [ -e x.txt ]
then
    echo "ok"
else
    echo "nok"
fi
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #file #exist
ADD COMMENT
Topic
Name
4+9 =