write a shell program to check wheather a given string is
pallindrome or not?
Answer Posted / mahesh gupta
this script is written for bash :
echo Enter the string
read s
echo $s > temp
rvs="$(rev temp)"
if [ $s = $rvs ]
then
echo "it is palindrome"
else
echo " it is not"
fi
| Is This Answer Correct ? | 21 Yes | 6 No |
Post New Answer View All Answers
How do you create a shortcut in linux?
Is shell script a programming language?
How to print the first array element?
How to get the last line from a file using just the terminal?
How do I run a .sh file on mac?
What does $1 mean in bash?
How to pass an argument to a script?
How can I set the default rwx permission to all users on every file which is created in the current shell?
What happens when you type ls?
I want to connect to a remote server and execute some commands, how can I achieve this?
What is console line?
What is bash coding?
How to calculate the number of passed arguments?
Tell something about the super block in shell scripting?
How will you pass and access arguments to a script in linux?