Not sure how much of help this can be, but I find this alot easier....
cat 1.txt | perl -e use Net::CIDR; print join("\n", Net::CIDR::range2cidr(<STDIN>));
1.txt:
192.168.0.1-192.168.0.100...
Search:Type: Posts; User: kvs Search: Search took 0.02 seconds.
Results 1 to 1 of 1
|
|