aboutsummaryrefslogtreecommitdiff
path: root/2021/02/puzzle-1.awk
blob: 1caefc6f30e7a6fee4e6fcc1be6be7dc81214cfe (plain) (blame)
1
2
3
4
5
6
#!/usr/bin/env -S awk -f

/forward/ { hor += $2 }
/up/      { ver -= $2 }
/down/    { ver += $2 }
END       { print hor * ver }