day 7, remove small cruft

This commit is contained in:
setop 2022-12-08 12:45:00 +01:00
parent 3c39e0e147
commit 1ab8a785d5
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ $2 == "cd" && $3 == ".." {
S[depth]=0 S[depth]=0
depth -= 1 depth -= 1
} }
$2 == "cd" && $3 != ".." { depth += 1; P[depth]=$3; } $2 == "cd" && $3 != ".." { depth ++ }
NF == 2 { NF == 2 {
for (i=1;i<=depth;i++) { for (i=1;i<=depth;i++) {
S[i]+=$1 S[i]+=$1