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
What is the use of "$#" in shell scripting?
What is another name for a bash shell script that you might see?
How many fields are present in a crontab file and what does each field specify?
Differentiate between ‘ and ” quotes.
How to print the first array element?
What is meant by $1 in shell script?
Where is bash history?
What is shell scripting?
What is the syntax of "nested if statement" in shell scripting?
Explain about the exit command?
c program which behaves like a shell(command interpreter). it has its own prompt say "NewShell$".any normal shell command is executed from your shell by starting a child process to execute a system program corrosponding to the command
What is inside a seashell?
How does path variable work?
What's the difference between scripting and coding?
What is console line?