From cea65bd1bc16f1fbb99ded3a051db1f2aad781af Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Wed, 4 May 2011 19:30:49 +0200 Subject: [PATCH] Support log file without "buf size" message Instead of trying to get the buf size in the first log, grep on all logs and take the value of the first match. --- communication_techniques/parsing.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/communication_techniques/parsing.sh b/communication_techniques/parsing.sh index db85a80..72b9fff 100755 --- a/communication_techniques/parsing.sh +++ b/communication_techniques/parsing.sh @@ -48,7 +48,7 @@ init_log_vars () fi metriqueList="cache_hits cache_miss cycles total_time" nbIter=`ls -1 *.log | head -1 | sed -r "s/^.*nbIter_([[:digit:]]+).*$/\1/"` - valuePerCacheLine=$(grep "^buf size: " $(ls -1 *.log | head -1) | sed -r "s/^buf size: ([[:digit:]]+)$/\1/") + valuePerCacheLine=$(grep "^buf size: " *.log | head -1 | sed -r "s/^.*:buf size: ([[:digit:]]+)$/\1/") } parse_args ()