I have 2 strings:
I would like to know if there was some way to count the amount of letters in $answer that are same as $guess, in this case I should get number 7. Some notes are that $answer and $guess will change.'
Because of the accusation that I posted a duplicate, the one suggested is asking for length of word; I am asking for how many letters in 2 strings are equal. For example, "Stackoverflow" and "stkflw". would want something to count how many letters in "stkflw" are equal to the letters in "Stackoverflow". I need it to count all letters in a word, for an example, "Test" should return 4 because it has 4 letters (an answer has one that returns 3 with test which is not desirable)
If this could be done in bash, that would be great! :)