could someone help me to write my first script in bash, I want to write a script that works on specific files that generate daily with $date at the end of the filename and make a decision whether file size is less than a value then do something. sample:
#!/bin/bash
PATH="/home/me/myscript"
FILE="OT_*_'$DATE'.csv"
FILESIZE=$(wc -c < "$FILE")
DATE="`date +%Y-%m-%d`"
if ((FILESIZE<=201));
then
echo "Input file is empty";
else
echo "Input file has data";
fi