#!/usr/pkg/bin/bash set -- "$QUERY_STRING" while read -r do echo i"${REPLY: 3}" done < <(grep -rn "${*}" ..)