start of new file
[IRC.git] / Robust / src / Tests / CallGraph / reduceDotFile
1 #!/bin/bash
2
3 echo 'Removing all entries in call graph dot files without'
4 echo 'the prefix CGTest...'
5
6 for dfile in `ls *.dot`
7 do
8
9 # we definitely want the first line of
10 # the dot file, so just send it to the
11 # temporary file
12 sed -n '1,1 p' <$dfile >$dfile.temp
13
14 # now take only the directed edge statements
15 # from the dot file that have the pattern CGtest
16 sed -n '/CGTest/ p' <$dfile >>$dfile.temp
17
18 # then throw the closing bracket at the end
19 echo '}' >>$dfile.temp
20
21 # and then clobber the old file
22 mv $dfile.temp $dfile
23 done
24