fork download
  1. read -p "Enter a string:" string
  2. if [[ $(rev <<< "$string") == "$string" ]];
  3. then
  4. echo "palindrome"
  5. else
  6. echo "not a palindrome"
  7. fi
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
palindrome