/* Reverse Of a String */

20/10/2010 12:29

echo "Enter a String"

read str

echo $str

x=0

x=`expr $str | wc -c`

echo " The length of the String is $x"

while [ $x -gt 0 ]

 do

    y=`echo $str | cut -c $x `

    echo $y

    x=`expr $x -1`

 done

Bookmark and Share

Done by Aarya