I found the below function online (thanks to whoever wrote it}. The problem seems to be more is wrapping the output. I like the option to view output page by page but do not like wrapping. How can I change to no line wrapping but allow for scrolling the output like less or more commands?
# Find a pattern in a set of files and highlight them:
#+ (needs a recent version of egrep).
function fstr()
{
OPTIND=1
local mycase=""
local usage="fstr: find string in files.
Usage: fstr [-i] "pattern" ["filename pattern"] "
while getopts :it opt
do
case "$opt" in
i) mycase="-i " ;;
*) echo "$usage"; return ;;
esac
done
shift $(( $OPTIND - 1 ))
if [ "$#" -lt 1 ]; then
echo "$usage"
return;
fi
find . -type f -name "${2:-*}" -print0 |
xargs -0 egrep --color=always -sn ${case} "$1" 2>&- | more
}