RosettaCodeData/Task/Palindrome-detection/UNIX-Shell/palindrome-detection.sh
2018-06-22 20:57:24 +00:00

5 lines
107 B
Bash

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