Skip to content

Commit

Permalink
Use sed instead of awk to find the Iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
sguada committed Feb 9, 2014
1 parent 8880cb4 commit 500804e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/parselog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ echo "Usage parselog.sh /path_to/caffe.log"
fi
LOG=`basename $1`
grep -B 2 'Test ' $1 > aux.txt
grep 'Iteration ' aux.txt | awk -F ',| ' '{print $7}' > aux0.txt
grep 'Iteration ' aux.txt | sed 's/.*Iteration \([[:digit:]]*\).*/\1/g' > aux0.txt
grep 'Test score #0' aux.txt | awk '{print $8}' > aux1.txt
grep 'Test score #1' aux.txt | awk '{print $8}' > aux2.txt
grep ' loss =' $1 | awk '{print $6,$9}' | sed 's/,//g' | column -t > $LOG.loss
paste aux0.txt aux1.txt aux2.txt | column -t > $LOG.test
rm aux0.txt aux1.txt aux2.txt
rm aux.txt aux0.txt aux1.txt aux2.txt

0 comments on commit 500804e

Please sign in to comment.