Dear All I am trying to create a shell script that accepts any input and reverses the order. I came up with the code as below but however I don't seem to achieve my objective. Please members kindly tell me what problem is with my script
!/bin/sh
#
#
clear
#
#
echo -e "\n\n\nFor Example: Given 1234, I will print 4321.\n\n"
# echo -e "\n\nPlease enter a string of numbers:\n"
# read num
set num=1234
set rev=0
set tmp_num="$num"
while [ $num !=$rev ]
do
RMND=$num %10
rev=$RMND +10*$rev
num=$num / 10
done
echo -e "\nThe reverse of the Number $tmp_num is $rev"