StackOverflow 文档 sh 教程 read 命令 逐字读一行 逐字读一行 Created: November-22, 2018 $ IFS= read -r foo <<EOF > this is a \n line >EOF $ printf '%s\n' "$foo" this is a \n line 读取剥离前导和尾随空格的行read 命令