Comparing corresponding values of two lines in a file using awk : <pre><code>name1   20160801|76 20160802|67 20160803|49 20160804|35 20160805|55 20160806|76 20160807|77 20160808|70 2016089|50  20160810|75 20160811|97 20160812|90 20160813|87 20160814|99 20160815|113    20160816|83 20160817|57 20160818|158    20160819|61 20160820|46 20160821|1769608    20160822|2580938    20160823|436093 20160824|75 20160825|57 20160826|70 20160827|97 20160828|101    20160829|96 20160830|95 20160831|89 
name2   20160801|32413  20160802|37707  20160803|32230  20160804|31711  20160805|32366  20160806|35532  20160807|36961  20160808|45423  2016089|65230   20160810|111078 20160811|74357  20160812|71196  20160813|71748  20160814|77001  20160815|91687  20160816|92076  20160817|89706  20160818|126690 20160819|168587 20160820|207128 20160821|221440 20160822|234594 20160823|200963 20160824|165231 20160825|139600 20160826|145483 20160827|209013 20160828|228550 20160829|223712 20160830|217959 20160831|169106 
</code></pre>

<p>I have the line position of two lines in a file say line1 and line2. These lines may be anywhere in the file but I can access the line position using a search keyword based on name(the first word) in each line</p>

<p>20160801 means yyyymmdd and has an associated value separated by |
I need to compare  the values associated with each of the date for the given two lines.</p>

<p>I am a newbie in awk. I am not understanding how to compare these two lines at the same time.</p>
