What shell/unix command can I use to count the number of fields in a string variable based on a string delimiter?
For example:
count_str="DB_ANSWER_DATA 52428800 50528256 96.375 10420224 5"
The output is varied, in this case, count_num variable would return 6. and the delimiter is ' '
Thanks,
For example:
count_str="DB_ANSWER_DATA 52428800 50528256 96.375 10420224 5"
The output is varied, in this case, count_num variable would return 6. and the delimiter is ' '
Thanks,