If awk of Busybox has a range limit issue, then try calculating in the
shell itself:
echo $(( `echo "255.255.255.255" | awk -F\. '{printf "(%i*256*256*256)
+ (%i*256*256) + (%i*256) + (%i)", $1, $2, $3, $4}'` ))
Awk creates the formular, while ash calculates it via $((
Maddes
On 15.07.2010 11:46, Gioacchino Mazzurco wrote:
> Hey all I have a big problem with openwrt!
>
> In a bash shell if i write this command
> printf "%d\n" "`echo "255.255.255.255" | awk -F\. '{printf "%d",
> ($4)+($3*256)+($2*256*256)+($1*256*256*256)}'`"
> i obtain
> 2147483647
> that is wrong!
>
> If i put the same command in my gentoo bash shell i obtain 4294967295
> that is the good value how to fix this ?
>
>
>
> _______________________________________________
> openwrt-devel mailing list
> [email protected]
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel