News:

SMF - Just Installed!

Main Menu

Scripting Question - diff/compare or bash shell script

Started by mahesh, Aug 26, 2023, 07:52 AM

Previous topic - Next topic

mahesh

Hi

I could not quite find the correct forum for this question I have.
Its related to file editing/bash scripting or the diff/compare commands found on Ubuntu

My scenario:
Looking to find 2 files with "almost exact content" out of a list of 150 files.

Fileset_A* has 75 files and Fileset_B* has 75 files
eg. Fileset_A_025.txt and Fileset_B_149.txt have almost the same content/data.
I just need at least 10 consecutive words to match in both, then I need to flag this diff/compare as a hit( they are similar) and record the 2 file names.
How do I diff or compare each file to each other file to get the hit.
All files have a single paragraph in them, with a max. of 220 words (max. 1300 characters) in the biggest file.


Can anyone assist please?
or guide me to correct forum too