#!/bin/bash for line in `findoccurances "$1"` do file=`echo $line | sed 's/:.*//'` for possible in `analyze_file $file | tr " " ","` do aline=`echo $possible | cut -f 1 -d ","` afile=`echo $possible | cut -f 2 -d ","` afunction=`echo $possible | cut -f 3 -d ","` if [ $afunction == $1 ] then echo $afile:$aline: $afunction fi done done