bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ReadLines and Substraction


From: yetcom
Subject: ReadLines and Substraction
Date: Mon, 14 Mar 2011 03:47:04 -0700 (PDT)
User-agent: G2/1.0

Hello Everyone,

I have an issue regarding the bash. I have 2 different files and each
of them involves some float point numbers for each lines. I want to
subtract each line then put all the results into a file. The first
line float number will be subtract with the first line of other file
and the second with the other second... and etc...

When I read both files with:

cat ./Temp1.log | while read line; do

            cat ./Temp2.log | while read line; do

            #It reads the first line of temp1, I also need to read the
first line of temp2. However, Temp2 will be read until the end of file
so that I cannot read one by one for each lines of different files.

            done

done


If you can help me with this, will be very happy for that. Thanks in
advance.

Best.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]