Roland <devz...@web.de> writes:

> Hi Stefan,
>
> looks good for me so far and indeed, on very large system when VMs eat
> up >2TB this could hit the limit very soon.
>
> but shouldn't we add some newline , as the original "print sum" prints one ?
>
> root@s740:/usr/sbin# seq 1 100000 | awk '{ sum += $1 }; END { print sum }'
> 5.00005e+09
> root@s740:/usr/sbin# seq 1 100000 | awk '{ sum += $1 }; END { printf
> ("%.0f", sum) }'
> 5000050000root@s740:/usr/sbin#
>
> # seq 1 100000 | awk '{ sum += $1 }; END { print sum }'|xxd
> 00000000: 352e 3030 3030 3565 2b30 390a            5.00005e+09.
>
> # seq 1 100000 | awk '{ sum += $1 }; END { printf ("%.0f", sum) }' |xxd
> 00000000: 3530 3030 3035 3030 3030                 5000050000
>
> # seq 1 100000 | awk '{ sum += $1 }; END { printf ("%.0f\n", sum) }' |xxd
> 00000000: 3530 3030 3035 3030 3030 0a              5000050000.
>

I see that this appears different in that way.

In the script the result is always assigned to a variable which should
not care about a newline, or should even better be without the newline
in my opinion.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to