#!/bin/sh

if [ $# -eq 0 ] ; then
 echo "____________________________________________________________________"
 echo " Herminux text finder. Usage: ftxt <text to search> [folder or file]"
 echo " (If no folder/file is specified, looking in the current folder.)"
 echo " (Upper-/lowercase doesn't matter, words not need to be whole.)"
 echo " (Hint: Put the text between double-quotes if they contain space.)"
 echo "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
 exit 0
elif [ $# -eq 1 ] ; then
 grep -rin ./ -e "$1"
elif [ $# -eq 2 ] ; then
 grep -rin "$2" -e "$1"
fi

