STR2=159
END2=200
for ((i=STR2; i<=END2; i++))
do
printf -v HEX "%016x" $i
printf "%s:%s:%s:%s\n" ${HEX:0:4} ${HEX:4:4} ${HEX:8:4} ${HEX:12:4}
done
But be aware you will run into an issue with IPs greater than "7fff:ffff:ffff:ffff" as bash uses signed 64-bit integers. The highest order bit is a sign bit and so the integer representation of these values will be a negative number:
Your question is a bit difficult to understand and answer as you're talking IPv6 and hexadecimal, but you're showing numbers and samples that don't comply.
IPv6 uses 128 bit addresses, split into 8 subparts of 16bit each, represented in what is known as "colon-hexadecimal".
depending on where you come from, a billion is 1E9 or 1E12, respectively. A hex number consisting of 16 sequential "F"s (equ. 4 subparts) is roughly 1,8E19, so way beyond that.
in hexadecimal, "FFFF" would be the last representable number in four digits, not "each part max number is 9999". So the difference between 0x10000 and 0x95 would be 0xFF6B (65387), leading to quite unwieldy an output file.
Considering these implications, Chubler_XL's proposal handles the situation of non-IPv6 perfectly well: