I have a question how to load content of text file into the array, where every member of array will present one line of the file.
First, let have file a.txt with following context:
Code:
this is line1
this is line2
When I did
Code:
my_list=($(<a.txt))
the first array member was 'this' and not 'this is line1' as I intended. So I've used the quotes:
Code:
my_list=("$(<a.txt)")
but the result was the whole file a.txt. So is there any way how to tell bash to delimit the context for array member by new line and not by space/tab?