I have a text file with IP addresses in cidr format. One cidr per line. How do I convert the cidrs to IP ranges i.e start IP - end IP. One IP range per line. Please note the space on either side of the - .
相关问题
- UNIX Bash - Removing double quotes from specific s
- Split a .txt file based on content
- Using awk / sed to find and replace key value pair
- sed - replace several consecutive lines matching p
- Filter ldapsearch with awk/bash
相关文章
- Reverse four length of letters with sed in unix
- PostgreSQL field data type for IPv4 addresses
- Spread 'sed' command over multiple lines
- Why does sed command contain at symbols
- How to detect EOF in awk?
- How use netaddr to convert subnet mask to cidr in
- Sed command works on Linux, but not on OS X
- Extracting part of a string to a variable in bash
You'd better use
ipcalc
:A simple script to loop through the file: