I just noticed that whereas the man page for the expr(1) command goes to some trouble to precisely document the size of integers it uses for all of its calculations (both with and without the -e option) there is no equivalent documentation present in the case of the test(1) command or its sh(1) builtin equivalent. (See also the "Arithmetic Expansion" section of the sh(1) man page, where the issue also arises.) I think that both the test(1) man page and the sh(1) man page should specify the size of integers used by these programs, and also whether or not the internal integers used are treated as being signed or not. It would be Nice to know if the following shell code will or will not necessarily produce ``correct'' results... if [ "$x" != 5000000000 ] ; then echo Too big to fail\! fi Fix: I dunno what the proper fix is. Probably just add some verbage to both man pages along the lines of what is in the expr(1) man page. But that is just a guess. Maybe something about the size of the ints should also be mentioned in the following additional man pages as well: builtin(1) csh(1) tcsh(1) bash(1) How-To-Repeat: man 1 test man 1 sh man 1 builtin
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped