Hi,
Following script work fine:
#!/bin/bash
FILE=$1
if [ -s $FILE]; then
echo Yay
else
echo Boo
fi
But I would like to add another condition that if FILE > 100MB exit??
thanks
Lem
2
if...; then... ; elif (( $(stat -c %s $FILE) > 104857600 )); then exit; else... ; fi
--
Bye
Thanks Lem..
---------- Post updated at 03:11 PM ---------- Previous update was at 03:05 PM ----------
Hi,
I was trying to plugged in like this:
#!/bin/bash
FILE=$1
if [ -s $FILE && ( $(stat -c %s $FILE) > 104857600 ) ]; then
echo Yay
else
echo Boo
fi
Did not work..
Lem
4
if [ -s $FILE ] && (( $(stat -c %s $FILE) > 104857600 )); then
--
Bye
1 Like