I have a text file with several lines and would like to write a bash script that reads the text file and store each line in different variable.
Here is how my file looks like.
cat file.txt
 line1
 line2
 line3
I would like to get the following:
variable1=line1
variable2=line2
variable3=line3
Do you have any idea how can I do this?
 
    