When using the Linux command "ls", I list all of the files in a directory. I am trying to store the results of the command ls in an array in bash, and then I want to be able to print each element of the array out.
This is what I've tried.
> file_array=( $<ls>) )
and
> file_array= 'ls'
I get an error with the first one, and my array with just print out "ls" with the second one.