When setting IFS to split on newlines, why is it necessary to include a backspace?

后端 未结 5 1196
灰色年华
灰色年华 2020-12-12 20:29

I\'m curious as to why the backspace is necessary when setting IFS to split on newlines like this:

IFS=$(echo -en \"\\n\\b\")

Why can I not

5条回答
  •  情书的邮戳
    2020-12-12 20:45

    I just remembered the easiest way. Tested with bash on debian wheezy.

    IFS="
    "
    

    no kidding :)

提交回复
热议问题