Categories
Programming

Test if files exists

Searches in $directory for any files that begin with $today. If it find any files the script will exit.

[code language=”bash”]
#!/bin/bash

if [ $daily -eq "1" ] ; then
if ! find $directory -type f -name "$today*" -exec false {} + ; then
exit;
fi;
fi;
[/code]