code:
break on cls
IF Open(1,"c:\a.txt") = 0
IF Open(2,"c:\b.txt",5) = 0
$x = ReadLine(1)
WHILE @ERROR = 0
? "Line read: [" + $x + "]"
If InStr($x,"yes")
$RC = WriteLine(2,$x + @CRLF)
? "Line written: [" + $x + "]"
ENDIF
$x = ReadLine(1)
LOOP
ENDIF
ENDIF

Get $_

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.