what i want is to try and verify string 1 which contains 20 bytes with string 2 that contains 6 bytes and string 1 contains various multiple lines in the text file while the string 2 contains it only 1 time only. I would like the matches result to be returned as total and tell me which is the result numbers that were found matching. all Echo'd to me.

Here is a breakdown of what Im trying to do



Im trying to verify data (Numerical) in the first section which is always static which are 20 bytes static but always different values.

Ex:. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20

Aka 20 bytes

These numbers are random, Never the same however its always in order and up to 99.

What im trying to do is verify the string data to see if and how many matches there is in the second string data which is always 6 bytes.

Ex:. 01 02 03 04 05 06

Aka 6 bytes

in the example I would find that String 2 contains 6 matching results from string 1 because 01 02 03 04 05 06 is present.

Now Here's a more tricky part. String 1 is writting to text file on various lines while string 2 changes once a week only 1 time on another text file. Therefore I need to script to be able to compare the results in a while or some kind of loop. so the end result appears as

(Value found in text file of string 1) Found 3 matches from (String 2)
(Value found in text file of string 2) Found 0 matches from (String 2)

etc..

And if possible to also include the result numbers that were found is 03 04 05 then to tell me.

Sorry for the long post I don't even know if I wrote it properly Im rusty @ scripting i just got back into it after coming back from vacation and I can't figure this out.

I've tried to write the data in text files both of them and read it through in a loop and get the data one by one in a IF statement then increment a variable if one result is found however that doesn't work out.

Ex;>

Code:
 
alias cycnum { 
  var %x = 1
  while (%x <= $lines(let.txt)) {
    if ($gettok($read(numbs.txt,1),1,32) isin $read(let.txt,%x)) { %sixf = 1 }
    if ($gettok($read(numbs.txt,1),2,32) isin $read(let.txt,%x)) { inc %sixf }
    if ($gettok($read(numbs.txt,1),3,32) isin $read(let.txt,%x)) { inc %sixf }
    if ($gettok($read(numbs.txt,1),4,32) isin $read(let.txt,%x)) { inc %sixf }
    if ($gettok($read(numbs.txt,1),5,32) isin $read(let.txt,%x)) { inc %sixf }
    if ($gettok($read(numbs.txt,1),6,32) isin $read(let.txt,%x)) { inc %sixf }
    .timer 1 2 /echo -a 7,1Found --- %sixf --- Matches in --- $read(let.txt,%x) 
    unset %sixf
    inc %x
  }
}