I need to check if wc command output is greather than a variable. Here's my code:
if test wc -w $i -gt $num
then
echo "too great"
fi
If the current file $i contains more words than the $num variable i print "too great". I already tried all but can't get the script working.