 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Awk program to print output of comm command in required format</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/awk-program-to-print-output-of-comm-command-in-required-format/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/awk-program-to-print-output-of-comm-command-in-required-format/</link>
	<description></description>
	<lastBuildDate>Sat, 25 May 2013 11:47:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: mikejava</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/awk-program-to-print-output-of-comm-command-in-required-format/#comment-117304</link>
		<dc:creator>mikejava</dc:creator>
		<pubDate>Sat, 16 Mar 2013 07:44:25 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/awk-program-to-print-output-of-comm-command-in-required-format/#comment-117304</guid>
		<description><![CDATA[up]]></description>
		<content:encoded><![CDATA[<p>up</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brydell</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/awk-program-to-print-output-of-comm-command-in-required-format/#comment-111736</link>
		<dc:creator>brydell</dc:creator>
		<pubDate>Tue, 02 Oct 2012 07:12:56 +0000</pubDate>
		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/itanswers/awk-program-to-print-output-of-comm-command-in-required-format/#comment-111736</guid>
		<description><![CDATA[Just very naievly assuming that the records in your two files z1 and&#160;z2 are in the same order, you can use &#039;getline &lt; &quot;filename&quot;&#039; to read from a second file.
Again, with no testing, just displaying the content of the lines, try this:
BEGIN { num=&quot; &quot;&#160;; nam1=&quot; &quot;; nam2=&quot; &quot;&#160;}{&#160;&#160;num = $1 ;&#160;nam1 = $2 ;&#160; getline &lt; &quot;file_z2&quot; ;&#160;nam2 = $2 ;&#160; print num, &quot;,&#160; &quot;, nam1,&quot;,&#160; &quot;,nam2}END {}
If you need to check that the two read lines actually contain the same&#160;emp-num, it of course gets trickier....
Good Luck.&#160;]]></description>
		<content:encoded><![CDATA[<p>Just very naievly assuming that the records in your two files z1 and&nbsp;z2 are in the same order, you can use &#8216;getline &lt; &#8220;filename&#8221;&#8216; to read from a second file.<br />
Again, with no testing, just displaying the content of the lines, try this:<br />
BEGIN { num=&#8221; &#8220;&nbsp;; nam1=&#8221; &#8220;; nam2=&#8221; &#8220;&nbsp;}{&nbsp;&nbsp;num = $1 ;&nbsp;nam1 = $2 ;&nbsp; getline &lt; &#8220;file_z2&#8243; ;&nbsp;nam2 = $2 ;&nbsp; print num, &#8220;,&nbsp; &#8220;, nam1,&#8221;,&nbsp; &#8220;,nam2}END {}<br />
If you need to check that the two read lines actually contain the same&nbsp;emp-num, it of course gets trickier&#8230;.<br />
Good Luck.&nbsp;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/10 queries in 0.042 seconds using memcached
Object Caching 281/287 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-25 11:57:54 -->