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 is tickets $ what low,medium,high priorite pls define time also
What is in a script?
c program to display the information of given file similar to givan by the unix or linux command ls -l
What does path stand for?
What is the difference between break and continue commands?
Can we run shell script in windows?
Is cmd a shell?
What makes c shell a more preferable option than the bourne shell?
How do I open a jshell in cmd?
Determine the output of the following command: [ -z “” ] && echo 0 || echo 1
What are the advantages of using shell scripts?
Write down the syntax for all the loops in shell scripting.
What is an sh file?
Can shell script run on windows?
write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?