I'm looking to compare two strings and capture the common part e.g.
FILE0000010985.LOG
FILE0000010999.LOG
FILE0000011000.LOG
If I compare 1 to 2, I want the output to be
FILE00000109
, but if I compare 1 to 3, the output would be 2 characters lessFILE000001
It's capturing the common prefix I suppose, but the strings are unknown to me, so it's not just as simple as using Bash's substring matching features etc.
sed
solution in that other question