In the last episode (Sep 30), Andrew said: > I'm counting traffic with ipfw and shell scripts. Is there a way to > use more than 32-bit numbers in shell arithmetic?
POSIX only requires "signed long" support in the shell, but FreeBSD's expr command has a -e flag that will let it do 64-bit math: $ echo $(( 65536*65536 )) 0 $ echo $(expr 65536 "*" 65536) 0 $ echo $(expr -e 65536 "*" 65536) 4294967296 bash, ksh93 (but not pdksh), and zsh's shell arithmetic are all 64-bit, also. -- Dan Nelson [EMAIL PROTECTED] _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"