#Bash + GNU utilities, 5851
f()(trfold -dc \ <<<$1<<<${@^^}|fold -1|sort|sort)
f $1|cmp$1|diff -sqBw - <(f $2)
- Define a function
f()
which: ${@^^}
converts all parameters to upper casefold -1
splits chars - one per linesort
s lines- call
diff
with-q
to suppress full diff output and-Bw
to ignore whitespace changes