Code:
cat test.sh
echo $1|awk '{if ($5=="24") print $1,$2,$3, "0/24"
if ($5=="23") { for (i=0;i<=0;i++) print $1,$2,$3+i, "0/23"
for (i=0;i<=1;i++) print $1,$2,$3+i, "0/24"
}
if ($5=="22") { for (i=0;i<=0;i++) print $1,$2,$3+i, "0/22"
for (i=0;i<=2;i=i+2) print $1,$2,$3+i, "0/23"
for (i=0;i<=3;i++) print $1,$2,$3+i, "0/24"
}
if ($5=="21") { for (i=0;i<=0;i++) print $1,$2,$3+i, "0/21"
for (i=0;i<=4;i=i+4) print $1,$2,$3+i, "0/22"
for (i=0;i<=6;i=i+2) print $1,$2,$3+i, "0/23"
for (i=0;i<=7;i++) print $1,$2,$3+i, "0/24"
}
if ($5=="20") { for (i=0;i<=0;i++) print $1,$2,$3+i, "0/20"
for (i=0;i<=8;i=i+8) print $1,$2,$3+i, "0/21"
for (i=0;i<=12;i=i+4) print $1,$2,$3+i, "0/22"
for (i=0;i<=12;i=i+2) print $1,$2,$3+i, "0/23"
for (i=0;i<=15;i++) print $1,$2,$3+i, "0/24"
}
if ($5=="19") { for (i=0;i<=0;i++) print $1,$2,$3+i, "0/19"
for (i=0;i<=16;i=i+16) print $1,$2,$3+i, "0/20"
for (i=0;i<=24;i=i+8) print $1,$2,$3+i, "0/21"
for (i=0;i<=28;i=i+4) print $1,$2,$3+i, "0/22"
for (i=0;i<=30;i=i+2) print $1,$2,$3+i, "0/23"
for (i=0;i<=31;i++) print $1,$2,$3+i, "0/24"
}
if ($5=="18") { for (i=0;i<=0;i++) print $1,$2,$3+i, "0/18"
for (i=0;i<=32;i=i+32) print $1,$2,$3+i, "0/19"
for (i=0;i<=48;i=i+16) print $1,$2,$3+i, "0/20"
for (i=0;i<=56;i=i+8) print $1,$2,$3+i, "0/21"
for (i=0;i<=60;i=i+4) print $1,$2,$3+i, "0/22"
for (i=0;i<=62;i=i+2) print $1,$2,$3+i, "0/23"
for (i=0;i<=63;i++) print $1,$2,$3+i, "0/24"
}
}' FS="[./]" OFS="."