ls
> file1 file2 file3
echo *
> file1 file2 file3
foo=$(ls)
echo $foo
> file1 file2 file3
echo "$foo"
> file1
> file2
> file3
In the last example, why are the filenames displayed on separate lines? Would you explain the steps that the shell (bash) goes through in processing it, please?