Just check out the script...
1 #!/bin/bash
2
3 echo -n "Enter a string :: "
4 read str
5 echo -n "Reverse is :: "
6 l=`expr length "$str"`
7 while [ $l -ge 1 ]
8 do
9 m=`echo $str | cut -c "$l"`
10 echo -n $m
11 l=`expr $l - 1`
12 done
13 echo
It takes a script and shows it in reverse manner.
it works well for single word input like..
But ignores the white space if multi-word is entered...
How can I fix this ??