do you want to count the number of matches? or just check if a string exists

the quickest equivalent to chekcing if ($read(file,w,string) != $null) is of course

Code:
//filter -ff file nul string | if ($filtered) {


i just tested the two over 500 iterations a bunch of times, and found them to be extremely close together. didnt even bother testing further, i find it safe to conclude that $read is more suitable since its the more logical method for this purpose (the method of using an invalid outfile such as nul to speed it up in this case isnt documented, and /filter is usually used to deal with multiple lines) and shorter/simpler

if you wanted to further use the line, like if ($read(...)) { commands $v1 } of course the way i used /filter wouldnt make that as easy. youd need to filter to another location, and retrieve it blabla.. youd lose time there ;D

so to summarize, id use $read when its most suitable: when im only interested in the first match. id use /filter in cases where im looking for several lines


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde