Find all files with the extension ".txt" (case insensitive) and for each of them, display the line containing the pattern "pattern" and the one before and the five after it.
find -iname "*.txt" | xargs grep -B1 -A5 'pattern'