Create a Linux shell script that will search for US phone numbers in files that are in a directory that has been passed in as a parameter to your script. The script must recognize phone numbers in the following formats: (570)555-1212, 570.555.1212, 570-555-1212, and +1.570.555.1212. Your script should also attempt to minimize false positives. The script should work on files that are compressed or uncompressed.
Create a Linux shell script that will search for US phone numbers in files that are in a directory that has been passed in as a parameter to your script. The script must recognize phone numbers in the following formats: (570)555-1212, 570.555.1212, 570-555-1212, and +1.570.555.1212. Your script should also attempt to minimize false positives. The script should work on files that are compressed or uncompressed. This script could be useful to you if you were trying to find phone numbers on a filesystem image that you have mounted on your Linux forensics workstation.
The output should be similar to the following, but you have some flexibility in the exact format:
letter.docx: (312)555-1212 570.389.3000
intro.txt: 570-389-3000
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images