Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWK voorbeeld correctie? #1

Open
ThomasParmentier opened this issue Nov 7, 2023 · 0 comments
Open

AWK voorbeeld correctie? #1

ThomasParmentier opened this issue Nov 7, 2023 · 0 comments
Assignees

Comments

@ThomasParmentier
Copy link
Contributor

Moet de index van sums[] geen constante zijn (zonder $) of mis ik het doel van het script?

{ 
     sums[2] += $2 
     sums[3] += $3 
     sums[4] += $4 
 } 

```awk
#! /usr/bin/awk -f
{
sums[$2] += $2
sums[$3] += $3
sums[$4] += $4
}
END {
for(s in sums)
print s, sums[s]
}
```

@ThomasParmentier ThomasParmentier self-assigned this Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant