Consider the following code
#!\bib\bash
echo -n "Enter string : "
read str
l=`expr length "$str"`
while [ "$l" -gt 0 ]
do
echo -e `echo $str | cut -c"$l"`"\c"
l=`expr "$l" - 1`
done
echo
the above code works perfect for string with no space in between. but fails when there is a space.
How can this be done ???