<br>This is a short bash script (grep does the work) to search for terms in the InsightToolkit example files.  It&#39;s a convenience wrapper that stores the path to the example files (.cxx in this case), the syntax of the grep call, and allows multiple terms to be given at once.  Modify the example search path for your purposes (it could be modified to search for the tcl or python examples too).  Modify the grep call as you like.<br>
<br><span style="font-family: courier new,monospace;">#### BEGIN SCRIPT</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#!/bin/bash</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">if [ $# -lt 1 ]; then</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    echo &quot;$0 &#39;search term&#39; [&#39;search term&#39; ...]&quot;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    exit 1</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">fi</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"># Search the CXX files<br>itkExamplePath=&quot;/opt/local/share/InsightToolkit/examples/*/*.cxx&quot;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">echo &quot;Searching ITK .cxx files in: ${itkExamplePath}&quot;</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">for term in $@; do</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    echo</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    echo &quot;Search term: ${term}&quot;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    grep -l -E -e ${term} ${itkExamplePath}</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">done</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">#### END SCRIPT</span><br style="font-family: courier new,monospace;">
<br>This is an example call on my platform:<br><br><span style="font-family: courier new,monospace;">$ itkSearchExamples.bash &#39;TransformWriter&#39; &#39;TransformReader&#39;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Searching ITK .cxx files in: /opt/local/share/InsightToolkit/examples/*/*.cxx</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Search term: TransformWriter</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/opt/local/share/InsightToolkit/examples/IO/TransformReadWrite.cxx</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Search term: TransformReader</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/opt/local/share/InsightToolkit/examples/IO/TransformReadWrite.cxx</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/opt/local/share/InsightToolkit/examples/Registration/DeformableRegistration14.cxx</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/opt/local/share/InsightToolkit/examples/Registration/DeformableRegistration8.cxx</span><br style="font-family: courier new,monospace;">
<br>Take care,<br>Darren<br><br>