Created
January 7, 2019 22:43
-
-
Save aic25/2b8ee0ac1ab0ab7a4f1432ab7e71e681 to your computer and use it in GitHub Desktop.
Find BER files and copy them to manage multiprocessing.
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 | |
find -name "BER.dat" | cat -n | while read n f; do | |
cp "$f" "$n".xx | |
done | |
sum=$(ls -l *.xx | wc -l) | |
paste -d" " *.xx | 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