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
This might work for you:
OIFS=$IFS; IFS=$'\n'; array=($(ls -ls)); IFS=$OIFS; echo "${array[1]}"