aoc2021/d01/d01_1.awk

5 lines
67 B
Awk

NR == 1 { A = $1; next }
$1 > A { N++ }
{ A = $1 }
END { print N }