verify if a file exists and create if not linux command line code example
Example 1: .sh script: check if file exist
#!/bin/bash
if [ -e x.txt ]
then
echo "ok"
else
echo "nok"
fi
Example 2: if file exist
file_exists ( string $filename ) : bool