I'm curious as to why the backspace is necessary when setting IFS to split on newlines like this:
IFS=$(echo -en "
")
Why can I not just use this (which doesn't work) instead?
IFS=$(echo -en "
")
I'm on a Linux system that is saving files with Unix line endings. I've converted my file with newlines to hex and it definitely only uses "0a" as the newline character.
I've googled a lot and although many pages document the newline followed by backspace solution, none that I have found explain why the backspace is required.
-David.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…