#!/bin/bash
#set -vx

if [ "$1" == "" ]
then
    echo "Search In Files usage: f.bash <pattern> <file extension>"
    echo "                     : With default <file extension> = ttcn"
    echo "                 e.g.: f.bash module ttcn"
    exit 0
fi

EXT=ttcn
if [ "$2" != "" ]
then
    EXT=$2
fi
find .. -type f -name "*.$EXT" -exec grep -nH $1 {} \;

exit $?
