Bash: read a file line-by-line and process each segment as parameters to other prog August 23, 2023 by Tarik You can simplify this a lot: while read file key log lat do echo "$cmd" "$key" "$log" "$lat" "$file" done < "$input"