I have a program where I have to take a c program that converts fro kelvin to far and vice versa. I need help with the output, it should read from a data file that I put in $file and the $choice from user and run it the the c program file .farh_kel
while read val
do
ans=`.fahr_kel $choice $val`
echo $line
echo $ans
done < file
MY OUTPUT SHOULD LOOK LIKE THIS
---------------------- -----------------------
0 256
---------------------- -----------------------
32 273
---------------------- -----------------------
100 310
---------------------- -----------------------
212 373
---------------------- -----------------------
108 315
---------------------- -----------------------
1243 945
---------------------- -----------------------
3000 1921
---------------------- -----------------------
853 02
---------------------- -----------------------
22 268
---------------------- -----------------------
2388 1581
---------------------- -----------------------
235 385
---------------------- -----------------------
Instead it looks like this :
---------------------- -----------------------
0 256
---------------------- -----------------------
32 273
---------------------- -----------------------
100 310
---------------------- -----------------------
212 373
---------------------- -----------------------
108 315
---------------------- -----------------------
1243 945
---------------------- -----------------------
3000 1921
---------------------- -----------------------
85 302
---------------------- -----------------------
22 268
---------------------- -----------------------
2388 1581
---------------------- -----------------------
235 385
---------------------- -----------------------
echo "$line".at the beginning of a program name is very strange style. Usually an initial.is used for files and directories that should be hidden by default, like startup and configuration files. Did you mean to write./fahr_kel?