bash - Read file line by line into var

PHOTO EMBED

Mon May 23 2022 07:02:00 GMT+0000 (Coordinated Universal Time)

Saved by @LavenPillay #bash

while IFS= read -r line; do
    echo "Text read from file: $line"
done < my_filename.txt
content_copyCOPY

https://stackoverflow.com/questions/10929453/read-a-file-line-by-line-assigning-the-value-to-a-variable