If you dont mind, can you explain to me how does the below work, i am not that much expert in unix. I want to try it but at least i need to understand what each parameter mean so that i will be able to load it to my script.
Quote:
|
Originally Posted by vgersh99
nawk -f char.awk fileFROMscript fileWithAllAccounts
char.awk:
Code:
FNR==NR {arr[$2] += $1; next }
{
printf("%d%s%s\n", ($1 in arr) ? arr[$1] : 0, OFS, $1)
}
|
Thanks for your help.