newline at the end of file

 

read line solve no newline 

while read line || [ -n "${line-}" ]; do
    echo $line
done < <(printf 'a\nb')

 

posted @ 2022-11-09 18:37  ascertain  阅读(28)  评论(0)    收藏  举报