I'm trying to write a shell script to delete 0kb files but the if statement keeps giving me errors, and i'm wondering if you can help me out
I have:
#!/bin/sh
EMPTY_FILE=$(find ${1-.} -size 0)
echo $EMPTY_FILE
echo "delete"
read text
if [ "$text" == "yes" ]; then echo yes; fi
error is
./deleteEmpty.sh: 6: [: yes: unexpected operator
Any help on whats wrong is useful! Thanks