The IP Address and Range Grepper is a Bash script that allows for easy extraction of IP addresses or IP ranges with CIDR notation from a given text file.
- Extract IP Addresses: Extracts standard IP addresses from a text file.
- Extract IP Ranges with CIDR: Extracts IP ranges in CIDR notation.
- Flexible File Input: Accepts the file path as a command-line argument.
- Bash environment (Typically available on Unix/Linux systems)
- Text file containing IP addresses or IP ranges
-
Clone or Download the Script: Download
ipgrepper.sh
to your local system. -
Make the Script Executable (if necessary):
chmod +x ipgrepper.sh
- Run the Script with the Input File
sh ipextractor.sh [path_to_your_file]
Replace [path_to_your_file]
with the path to the file you want to process.
- Follow On-screen Instructions: Choose whether to extract standard IP addresses (option 1) or IP ranges with CIDR (option 2).
The script will output the extracted IPs or IP ranges to a file named output.txt
in the same directory as the script.
Contributions, issues, and feature requests are welcome!
If you liked this or it helped you in anyway