The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 01-31-2008
fpmurphy fpmurphy is offline
Moderator
 

Join Date: Dec 2003
Location: /dev/fl
Posts: 1,122
Here is a simple example which should help you understand what is going on

Code:
bash-3.2$ ls tp*
tp  tp1 tp2 tp3 tp4
bash-3.2$fnarray=($(ls tp*))
bash-3.2$ echo ${#fnarray[*]}
5
bash-3.2$ echo ${fnarray[2]}
tp2
Reply With Quote