/usr/bin/matho-sum is in mathomatic-primes 16.0.4-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #!/usr/bin/python
# Python program to sum many large integers separated by spaces or newlines.
# The integers to sum may be entered on the command-line or into standard input.
import string
import sys
sum = 0 # initialize sum and make it an integer
args = sys.argv[1:]
if (args == []):
# read stdin if no command line args
while True:
try:
input_line = raw_input()
except:
break;
for s in string.split(input_line):
sum += int(s)
else:
# sum together the command-line args
for arg in args:
sum += int(arg)
print sum
|