The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-24-2009
strasner strasner is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 16
display whats in an array side by side

ok, so ive got some values that are inputed by a user and are stored in an array. Now what i want to do is change this piece of code below to show ina different way.

Code:
}
for (( num=0; num<9; num++ ))
do
    echo ${arr[$num]}
done
}

which outputs the array contents each on a seperate line. I want to output whats in the array onto a single line.

so, if the user inputs the letter "a" i want to automatically put that in the first array box. But if the user inputs the letter "b" then i want to automatically put that into the second array box.

sorry for the quickness of my second thread, im on a deadline today.

thanks in advance.