[MITgcm-devel] another testreport adjustment

Martin Losch Martin.Losch at awi.de
Tue Mar 3 03:21:15 EST 2015


Hi Jean-Michel, Oliver,

I would like to remove another “grep -A3”, which does not work on iblade from testreport and replace it with a complicated sed command that stretches over 4 lines. Also the “cat -n” is non-standard an some “cat”s cannot do that, so I would like to replace it with “nl”, see the attached testreport version. What do you think?

Martin

PS. here’s the diff

134c134
< 	grep "$2" $1/$4/$OUTPUTFILE | sed 's/.*=//' | nl > ${TMP}a.txt
---
> 	grep "$2" $1/$4/$OUTPUTFILE | sed 's/.*=//' | cat -n > ${TMP}a.txt
149c149
<     grep "$2" $1/$5 | sed 's/.*=//' | nl > ${TMP}b.txt
---
>     grep "$2" $1/$5 | sed 's/.*=//' | cat -n > ${TMP}b.txt
845,853c845,846
< #	  grep -A3 'Seconds in section "ALL' $OUTPUTFILE \
< #		| sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt"
< #         some implementations of grep cannot do contextual searches so we
< #         replace the above with a sed command
< 	  cat $OUTPUTFILE | sed -n '/Seconds in section "ALL/{N
< 	  N
< 	  N
< 	  p
< 	  }' | sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt"
---
> 	  grep -A3 'Seconds in section "ALL' $OUTPUTFILE \
> 		| sed 's/(PID.TID 0000.0001)   //' >> $CDIR"/summary.txt”
1694,1696c1687,1689

-------------- next part --------------
A non-text attachment was scrubbed...
Name: testreport
Type: application/octet-stream
Size: 59589 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-devel/attachments/20150303/5eed72ec/attachment-0001.obj>


More information about the MITgcm-devel mailing list