3 added 36 characters in body edited Sep 10 '15 at 0:41 ravwojdyla 11133 bronze badges `cat/python` only solution - not empty-input proof! ``````cat data | python3 -c "import fileinput as FI,statistics as STAT; i = list[int(l) for l in FI.input());]; print('min:', min(i), ' max: ', max(i), ' avg: ', STAT.mean(i), ' median: ', STAT.median(i))" `````` `cat/python` only solution - not empty-input proof! ``````cat data | python3 -c "import fileinput as FI,statistics as STAT; i = list(FI.input()); print('min:', min(i), ' max: ', max(i), ' median: ', STAT.median(i))" `````` `cat/python` only solution - not empty-input proof! ``````cat data | python3 -c "import fileinput as FI,statistics as STAT; i = [int(l) for l in FI.input()]; print('min:', min(i), ' max: ', max(i), ' avg: ', STAT.mean(i), ' median: ', STAT.median(i))" `````` 2 added 4 characters in body edited Sep 10 '15 at 0:33 ravwojdyla 11133 bronze badges `cat/python` only solution - not empty-input proof! ``````cat data | python python3 -c "import fileinput;fileinput inputas =FI,statistics [int(l)as forSTAT; li in= fileinputlist(FI.input()];); print ('min:', min(inputi), ' max: ', max(inputi), ' avgmedian: ', sumSTAT.median(inputi)/len(input)" `````` `cat/python` only solution - not empty-input proof! ``````cat data | python -c "import fileinput; input = [int(l) for l in fileinput.input()]; print 'min:', min(input), ' max: ', max(input), ' avg: ', sum(input)/len(input)" `````` `cat/python` only solution - not empty-input proof! ``````cat data | python3 -c "import fileinput as FI,statistics as STAT; i = list(FI.input()); print('min:', min(i), ' max: ', max(i), ' median: ', STAT.median(i))" `````` 1 answered Sep 9 '15 at 19:39 ravwojdyla 11133 bronze badges `cat/python` only solution - not empty-input proof! ``````cat data | python -c "import fileinput; input = [int(l) for l in fileinput.input()]; print 'min:', min(input), ' max: ', max(input), ' avg: ', sum(input)/len(input)" ``````