SyntaxFix
Write A Post
Hire A Developer
Questions
awk is very cool, but why not keep it simple?
num=$(echo $var | grep -o "," | wc -l)