I have a text file (file_111.txt) with the entries like
'string1 string2: string3.string4'
'string1 string2: string3.string22'
Another text file (file_222.txt) with entries like
I wanted to compare the last string [String after the dot (.) ] in file_111.txt with the string in file_222.txt.
If the string in file_111.txt is found in file_222.txt then echo the matched line in file_111.txt.
For example if string4 in the first line in file_111.txt has found a match in file_222.txt then
echo 'string1 string2: string3.string4' has matched
echo "no match found"
The script needs to take the path of the both text files as parameters
test.pl path/to/file_111.txt path/to/file_222.txt