LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mirror characters in an array (https://www.linuxquestions.org/questions/linux-newbie-8/mirror-characters-in-an-array-676702/)

flyordie 10-16-2008 02:15 AM

mirror characters in an array
 
i'm trying to find out how i can mirror a word by using an array
for example: i got this in a script

Code:

echo "what's your name?"
read name
declare -a NAME
NAME=($name)
echo " your name is: ${NAME[*]}"


but how can i make it say, if my name should be "Liesbeth", to be "htebseiL"

hopefully somebody can help me

greetz fly

Mr. C. 10-16-2008 04:07 AM

man rev, and perhaps a little more study.


All times are GMT -5. The time now is 04:43 PM.