Created
January 7, 2019 22:39
-
-
Save aic25/64319a34399fcb75c1d69baa12ce2d92 to your computer and use it in GitHub Desktop.
Average taker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sum=$(ls -l *.dat | wc -l) | |
paste -d" " *.dat | awk -v s="$sum" '{ | |
for(i=0;i<=s-1;i++) | |
{ | |
t1 = 2+(i*2) | |
temp1 = temp1 + $t1 | |
} | |
print $1""temp1/s | |
temp1=0 | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment