0

I already found a lot of articles with text diff between two files, but nothing to compare only two contents (output of CMD...). I dont want to store the two texts to disc, but I still want to compare them.

Is there anything like that?

diff 'aaabbbccc' 'aaaccc'
MakoBuk
  • 464
  • 2
  • 8
  • 18
  • 1
    Possible duplicate of [Bash string difference](https://stackoverflow.com/questions/454427/bash-string-difference) – Skgland Jan 23 '18 at 11:47

1 Answers1

0

Thanks to Skgland:

diff  <(echo "$string1" ) <(echo "$string2")
MakoBuk
  • 464
  • 2
  • 8
  • 18