I will try it later. now I still think that we loop While in the wrong way.since echo returns found in line 1 found in line 2 found in lin 3 found in line 4 found in line 5 when the string which matchs is in line 6 when it exists.. so I think the position of halt might be wrong.