aboutsummaryrefslogtreecommitdiff
path: root/bin/min.awk
blob: 18f658898d3cc14ed1e565d4ac4c20c704e986c2 (plain) (blame)
1
2
3
4
5
6
7
8
# Get the minimum of a list of numbers
BEGIN { min = 0 }
NR == 1 || $1 < min { min = $1 + 0 }
END {
    if (!NR)
        exit(1)
    print min
}