I am reading in a file: data.txt
containing lines like
B07G1W8SHN
B007E2L6G4
B07GXQS5DW
B06XBRP5WY
when I am reading a line of that file and put the variable $line
into some context
read line < data.txt
echo "context${line}context"
I get the following output:
contextB07G1W8SHN
what is happening here? I guess there are some hidden delete-characters
is my string?
How can I read the lines in a variable as a plain string?
xxd data.txt
output:
00000000: 4230 3747 3157 3853 484e 0d0a 4230 3037 B07G1W8SHN..B007
00000010: 4532 4c36 4734 0d0a 4230 3747 5851 5335 E2L6G4..B07GXQS5
00000020: 4457 0d0a 4230 3658 4252 5035 5759 0d0a DW..B06XBRP5WY..