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 the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 04-22-2009
mnmonu mnmonu is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 32
Quote:
Originally Posted by Franklin52 View Post
With ksh:

Code:
set -A arr $(ls)
Or:

Code:
ls | while read file
do
 i=$(($i+1))
 arr[i]="$file"
done
Regards
It also works well.........
Thaks for your support..............