RosettaCodeData/Task/Palindrome-detection/UNIX-Shell/palindrome-detection.sh
2023-07-01 13:44:08 -04:00

5 lines
107 B
Bash

if [[ "${text}" == "$(rev <<< "${text}")" ]]; then
echo "Palindrome"
else
echo "Not a palindrome"
fi