created on | January 18, 2022 |
creating a file descriptor
exec 1< whatever.txt
reading a file line by line
while IFS= read -r inputline; do
# process ${inputline}
done < $1
- or prevents leading/trailing whitespace from being trimmed.
- prevents backslash escapes from being interpreted.