count specific word in line in bash -


I have the variable like "1,2,3,4"

I should count

What you want:

  echo "1,2,3" | Tr -cd ',' | Wc -c  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -