;start search line
var %line 1

; stops when it reaches the end of the file
While ($read(file.txt,%line) != Null){

;compares the search with what is read
if (%searchtxt isin $read(file.txt,%line)) {

;or search for two strings
if (%searchtxt1 isin $read(file.txt,%line)) || (%searchtxt2 isin $read(file.txt,%line)) {

;msg the channel with the result
msg $chan $gettok($read(file.txt,%line),2,61)

;stop the search or comment out this line if you want multiple results
break or halt
}

;echo the line number that a result was found in
echo -a found in line %line

;increment the line that is to be read
inc %line
}


try that