I wanna write a script which will count the number of occurrence of a given string from a text file.
Suppose a text file content many phone numbers and many of them occurs several times on that text file.I am gonna provide a particular number and i want that script to count the number of presence of that given number.
Suppose the number 9988112233 occurs 15 times in a certain text file.So the script should return 15.
Hope i am clear..
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.