How to use `while read` (Bash) to read the last line in a file if ...
2010年11月12日 - I use the following construct: while IFS=$'\n' read -r LINE || [[ -n "$LINE" ]]; do echo "$LINE" done. It works with pretty much anything except null ...
stackoverflow.com |