AND connection of a Search request

hi, i need a command to connect two conditions

e.g.

grep -i wort1 *.doc | grep -i wort2

but in one grep command

I search in the file wus.txt with an offset. After letter 4 the word "mueller" and after the letter 13 the word "test":

OR-connection

/usr/xpg4/bin/grep "("^.\{4\}mueller"|"^.\{13\}test")" wus.txt

I NEED A AND-CONNECTION OF THIS SEARCH REQUEST

"("^....mueller..test")"

Just a guess, though :wink:

Try awk:

/usr/xpg4/bin/awk 'substr($0,5)~"^mueller" && substr($0,14)~"^test"'

ok.