-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
I'd like to use ripcal to convert the IP ranges in a file on all ASNs into CIDR notation. Unfortunately, ripcal does not have clean output (I may modify it).
Running it with IPs as an argument:
ripcal 1.0.181.0-1.0.182.255
1.0.181.0-1.0.182.255 = 1.0.181.0/22
1.0.181.0/22 = 1.0.180.0 - 1.0.183.255Running it with IPs passed in on STDIN:
echo "1.0.1.0-1.0.3.255" | ripcal
1.0.1.0/22
1.0.1.0/22 = 1.0.0.0 - 1.0.3.255So in order to get the output I need, I must run something like echo $1 | ripcal | head -n 1 | tr -d "\n". Unfortunately, I cannot pass this in to teip by enclosing it in quotes and the shell will interpret the pipes such that the output of teip gets piped to head.
Metadata
Metadata
Assignees
Labels
No labels