From eeae995e4ee4cd3e174fa0dbb6fd380f12d7fce7 Mon Sep 17 00:00:00 2001 From: Yifan Gao Date: Thu, 19 Dec 2019 14:47:56 +0800 Subject: [PATCH] Refactoring stat.sh --- stat.sh | 45 ++++++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/stat.sh b/stat.sh index d4f37d0d..6b163346 100755 --- a/stat.sh +++ b/stat.sh @@ -2,34 +2,25 @@ source common.sh cd result -for file in *.txt; do +for file in *.txt; do echo ${file%.*} if [[ $file == *6.txt ]]; then - cat $file | - awk -F\/ '{print $2}' | - ( - sum=0 - while read n; do - if [[ -n $n ]]; then - ((s=64-n)) - ((sum+=1<