Question - Given a directory containing only text files, recursively traverse the entire directory and print all the telephone numbers(base 10-digit format Indian mobile numbers and its variations) - can use bash scripting, python, java, C - or any other language.
Solution - implemented in python because of awesome regular expressions it has. But it can also be done in other programming languages. Almost all the code is self explanatory and conatains comments when needed.
How To Use
$python extract_num.py ./demo/
Input
./demo/
Output
7654545544
9533434343
09535353553
09898989898
9867745434
7675645453
9876767686
9877654321
9878686866
00918765867389
987 675 6343
+91765 797 8786
900 345 3432
8454545454
8754454546
+919001809786
9876767855
00918745667858
07456578675
9787878787
9898989656
9898989666
813 734 5312
813 734 5312
09999999989
9878787878
09876565656
09162589299