"Tricks and Craft" in Bash Scripting
Process Input Line by Line 1#!/bin/bash 2input="path/to/file" 3while IFS= read -r line 4do 5 # process each read-in line 6 echo "$line" 7done < "$input" # NORICE HERE Pay attention to the < part following done on the last line. It redirects the $input file to stdin of read process, making …