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