Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#Bash + Linux utils, 56

Bash + Linux utils, 56

tr a-z `printf %s {z..a}`<<<${1,,}|cmp - <(rev<<<${1,,})

Outputs the empty string for Truthy and something like - /dev/fd/63 differ: byte 1, line 1 for Falsey. If this is not acceptable then we can add -s for an extra 3 bytes and use the standard Unix return codes of 0 for Success (Truthy) and 1 for Failure (Falsey).

#Bash + Linux utils, 56

tr a-z `printf %s {z..a}`<<<${1,,}|cmp - <(rev<<<${1,,})

Outputs the empty string for Truthy and something like - /dev/fd/63 differ: byte 1, line 1 for Falsey. If this is not acceptable then we can add -s for an extra 3 bytes and use the standard Unix return codes of 0 for Success (Truthy) and 1 for Failure (Falsey).

Bash + Linux utils, 56

tr a-z `printf %s {z..a}`<<<${1,,}|cmp - <(rev<<<${1,,})

Outputs the empty string for Truthy and something like - /dev/fd/63 differ: byte 1, line 1 for Falsey. If this is not acceptable then we can add -s for an extra 3 bytes and use the standard Unix return codes of 0 for Success (Truthy) and 1 for Failure (Falsey).

Source Link
Digital Trauma
  • 73.7k
  • 10
  • 116
  • 268

#Bash + Linux utils, 56

tr a-z `printf %s {z..a}`<<<${1,,}|cmp - <(rev<<<${1,,})

Outputs the empty string for Truthy and something like - /dev/fd/63 differ: byte 1, line 1 for Falsey. If this is not acceptable then we can add -s for an extra 3 bytes and use the standard Unix return codes of 0 for Success (Truthy) and 1 for Failure (Falsey).

AltStyle によって変換されたページ (->オリジナル) /