I\'m trying to store the files listing into an array and then loop through the array again. Below is what I get when I run ls -ls command from the console.
ls -ls
I'd use
files=(*)
And then if you need data about the file, such as size, use the stat command on each file.