Folks - newbie bash coder here and I'd like to get your help to make the code below work. As you can see, I was trying to count the total number of lines with the 3rd value >= 15 in a file and wanted to make the threshold "15" configurable, but apparently the $THRESHOLD value was not populated correctly.
Thanks for your help!
THRESHOLD=15
REPORT_FILE=./report.txt
CMD="awk '{if ($3 >= $THRESHOLD) L++} END {print L}' $REPORT_FILE"
echo Command: $CMD
$CMD