That depends on how you want to match it.

If you say "xtext is in file" do you mean an exact instance of xtext without wildcards?

Like:

word1
word2
xtext
word3

or more like:

word1
this is blablaxtextblabla
word2

Specific matching goes with: if !$read(myfile.txt,nw,xtext) { do things }

Wildcard matching like the second thing is: if !$read(myfile.txt,nw,*xtext*) { do things }


Gone.