5 Script to Check File is Present or Not

Program:

#!/bin/bash
file_name=abc.txt
if [ -e $file_name ]
then
    echo "File is Present"
else
    echo "No File is Present"
    touch $file_name    
fi	

Output:



Previous
Next Post »