In string \"12345\", out string \"54321\". Preferably without third party tools and regex.
read word
reve=`echo "$word" | awk '{for(i=length($0); i>0;i--) printf (substr($0,i,1));}'` echo "$reve"