projects
/
p2p-testing-infrastructure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Utils: 1-column-statistics added, which includes awk scripts that calculate min,...
[p2p-testing-infrastructure.git]
/
Utils
/
1-column-statistics
/
max
diff --git a/Utils/1-column-statistics/max
b/Utils/1-column-statistics/max
new file mode 100755
(executable)
index 0000000..
8d7ae92
--- /dev/null
+++ b/
Utils/1-column-statistics/max
@@ -0,0
+1,16
@@
+#!/usr/bin/awk -f
+# Calculates the maximum value of 1 column.
+
+BEGIN {
+ max = log(0)
+ FS = "[ \t]+"
+}
+
+/^[0-9]+/ {
+ if($1 > max)
+ max = $1
+}
+
+END {
+ printf "%f\n", max
+}