How to grep only 1st line

how to grep the line no of the first pattern match in a file having multiple line of pattern match.

linke i want to know the line no for the word "the" the first time it appears in the file, now a file is going to have the word "the" many times.. how to grep the first line no

for me -m 1'the' or -m 1"the" is not working!!!

kindly suggest somthing..

sed -n '/the/=' file

or simply

grep -n "the" file | head -n 1

thnx man!!!

awk '/the/ { print NR; exit }' file