How to check there are no html files in current directory?
- by kev
I have a script which will download html files into current directory.
Then it'll generate a report based on these html files.
At last, it'll delete all these html files.
So, when I run this script, I want to make sure there is no html files in current dir.
This is what I got:
if ls *.html >/dev/null 2>&1; then
echo 'clear HTML files first'
exit
fi
Is there any easy way to check?