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..

Recommended Answers

All 3 Replies

thanks for reply ..but how can i implement this with the file??

thanks a lot for help...!!!I have done it...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.