shell script to check whether a string is palindrome or not -Unix Program
Posted by Raj
shell script to check whether a string is palindrome or not -Unix Program
In this Tutorial, I will explain how to write shell script to check whether a string is palindrome or not.
Program: shell script to identify the given string is palindrome or not?
In this Tutorial, I will explain how to write shell script to check whether a string is palindrome or not.
Program: shell script to identify the given string is palindrome or not?
clear echo"Enter string:" read str str1=$str i='expr$str| wc-c' s='expr$i-1 While [$s-gt 0] do n='expr $str|cut-c$s' j=$r$n s='expr$s-1 done echo $j if[$str1==$j] then echo"String is palindrome" else echo"Not palindrome" fi
This entry was posted on October 4, 2009 at 12:14 pm, and is filed under
check whether a string is palindrome or not,
linux shell script,
shell script,
Unix Program
.You can leave a response, or trackback from your own site.