Using a batch script (.bat file) in windows xp, how would I go about reading a text file and finding how many instances of a character exists?
For example, I have a string with the following:
""OIJEFJ"JOIEJKAJF"""LKAJFKLJEIJ""JKLFJALKJF"LKJLKFA""""LKJKLFJLKADJF
I want it to count how many "
there are in the file and return the count.
Let's start counting the characters in a line. First the slow and clear method:
Now the fast and cryptic method:
Finally the method to count the characters in a file: