Assume I have a file named file.txt with the following contents
I want to read the file into array and store each line in each index. I've tried using the following code.
dataarray=($( < file.txt ))
It stores each word in each index rather than each line in each index.
Can someone please help me.