Skip to main content
deleted 7 characters in body
Source Link
Digital Trauma
  • 73k
  • 9
  • 112
  • 264

#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 case
  • fold -1 splits chars - one per line
  • sorts lines
  • call diff with -q to suppress full diff output and -Bw to ignore whitespace changes

#Bash + GNU utilities, 58

f()(tr -dc \ <<<${@^^}|fold -1|sort)
f $1|cmp -s - <(f $2)

#Bash + GNU utilities, 51

f()(fold -1<<<${@^^}|sort)
f $1|diff -qBw - <(f $2)
  • Define a function f() which:
  • ${@^^} converts all parameters to upper case
  • fold -1 splits chars - one per line
  • sorts lines
  • call diff with -q to suppress full diff output and -Bw to ignore whitespace changes
deleted 17 characters in body
Source Link
Digital Trauma
  • 73k
  • 9
  • 112
  • 264

#Bash + GNU utilities, 58

f()(tr -dc \ <<<${@^^}|fold -1|sort)
f $1|cmp -s - <(f $2)

#Bash + GNU utilities, 58

f()(tr -dc \ <<<${@^^}|fold -1|sort)
f $1|cmp -s - <(f $2)

#Bash + GNU utilities, 58

f()(tr -dc \ <<<${@^^}|fold -1|sort)
f $1|cmp -s - <(f $2)
deleted 17 characters in body
Source Link
Digital Trauma
  • 73k
  • 9
  • 112
  • 264

#Bash + GNU utilities, 7158

f()(tr -dc '[:alnum:]'<<<$\ <<<${1^^@^^}|fold -1|sort)
f "$1"|cmp$1|cmp -s - <(f "$2"$2)

#Bash + GNU utilities, 71

f()(tr -dc '[:alnum:]'<<<${1^^}|fold -1|sort)
f "$1"|cmp -s - <(f "$2")

#Bash + GNU utilities, 58

f()(tr -dc \ <<<${@^^}|fold -1|sort)
f $1|cmp -s - <(f $2)
Source Link
Digital Trauma
  • 73k
  • 9
  • 112
  • 264
Loading