This is driving me insane. I think it has to do with Synology
This is being ran on a Synology Server.
Code:
### VARIABLES ###
LOGIF=/volume7/homes/admin/scripts/data/achclean-logi.txt
HOWOLD=$(cat $LOGIF | wc -l)
# END DEFINITIONS
if (( ${HOWOLD} >= 7 )); then
echo -e "WORKS" >>
fi
I get this error in the terminal: scriptname: line Number: [Value of HOWOLD]: not found
If I run this on Linux, RedHat, it works.
Code:
HOWOLD=$(cat dfile | wc -l)
if (( ${HOWOLD} >= 2 )); then
echo "WORKS"
fi
EDIT:
NO LUCK!!!!!!!!
Code:
if [ "$HOWOLD" >= "7" ]; then # if 7, then it's been 7 days!
sh: 7: unknown operand
NO LUCK!!!!!!!!
Code:
if (( "$HOWOLD" >= "7" )); then # if 7, then it's been 7 days!
scriptname: line Number: [Value of HOWOLD]: not found