write a shell script to identify the given string is
palindrome or not?
Answer Posted / abhijeet chavan (cts)
set -x
input_string=$1
if [ -z "$input_string" ] ; then
echo "Please enter a Text along with the script name\n"
exit
fi
reversed_string=$(rev $input-string)
if [ "$input_string" -eq "$reverse_string" ] ; then
echo "The String $input_String is a Palindrome"
else
echo "This string is not a palindrome"
fi
| Is This Answer Correct ? | 49 Yes | 51 No |
Post New Answer View All Answers
What happens on a system call?
Why is it called a shell?
What is ms powershell?
What is the best shell scripting language?
Is powershell a bash?
What is the use of "$#" in shell scripting?
What does debug script mean?
What is shell and shell script?
What is bash used for?
Is cmd a shell?
How will you pass and access arguments to a script in linux?
What is shell scripting used for?
What language is used in terminal?
What are the four fundamental components of every file system on linux?
How to print the first array element?