O que você quer, efetivamente, é ter um estilo de loop no estilo do-script e usar read variable1 variable2
para ler os dois valores de uma só vez.
#!/bin/bash
# get rid of output_file.txt if it exists, write new file
# This is optional
[ -f output_file.txt ] && rm output_file.txt
# Read input once, then go into loop and start testing
# User's input
counter=0
read -p "Enter line #$counter or q to quit:" v1 v2
while [ "$v1" != "q" ]
do
printf "%s,%s,0\n" "$v1" "$v2" >> output_file.txt
counter=$(( $counter+1))
read -p "Enter line vs #$counter or q to quit:" v1 v2
done
Execução de teste:
$ ./read_double_input.sh
Enter line #0 or q to quit:5.834 -54.05
Enter line vs #1 or q to quit:7.728 -10.53
Enter line vs #2 or q to quit:7.96 -14.85
Enter line vs #3 or q to quit:q
$ cat output_file.txt
5.834,-54.05,0
7.728,-10.53,0
7.96,-14.85,0