
{"id":3462,"date":"2010-09-26T14:25:15","date_gmt":"2010-09-26T08:55:15","guid":{"rendered":"http:\/\/www.jeffrin.in\/?p=2968"},"modified":"2010-09-26T14:25:15","modified_gmt":"2010-09-26T08:55:15","slug":"comm-compare-two-sorted-files-line-by-line","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2010\/09\/26\/comm-compare-two-sorted-files-line-by-line\/","title":{"rendered":"comm &#8211; compare two sorted files line by line"},"content":{"rendered":"<p><a href=\"https:\/\/beautifulworknew.wordpress.com\/wp-content\/uploads\/2021\/03\/45021-comm1.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/beautifulworknew.wordpress.com\/wp-content\/uploads\/2021\/03\/45021-comm1.png?w=300\" alt=\"\" title=\"comm\" width=\"300\" height=\"225\" class=\"alignnone size-medium wp-image-2970\" \/><\/a><br \/>\n<code><br \/>\n$comm sorta.txt sortb.txt<br \/>\nd<br \/>\ng<br \/>\ncomm: file 1 is not in sorted order<br \/>\ne<br \/>\ns<\/p>\n<p>\tx<br \/>\ncomm: file 2 is not in sorted order<br \/>\n\tg<br \/>\n\ts<br \/>\n\tn<\/p>\n<p>$cat sorta.txt<br \/>\nd<br \/>\ng<br \/>\ne<br \/>\ns<\/p>\n<p>$cat sortb.txt<br \/>\nx<br \/>\ng<br \/>\ns<br \/>\nn<\/p>\n<p>$<\/p>\n<p>$cat sorta.txt<br \/>\na<br \/>\nb<br \/>\nc<br \/>\nd<br \/>\n$cat sortb.txt<br \/>\na<br \/>\nf<br \/>\ng<br \/>\nh<br \/>\n$comm sorta.txt sortb.txt<br \/>\n\t\ta<br \/>\nb<br \/>\nc<br \/>\nd<br \/>\n\tf<br \/>\n\tg<br \/>\n\th<br \/>\n$<br \/>\ncomm - compare two sorted files line by line<\/p>\n<p>With  no  options,  produce  three-column  output.<br \/>\nColumn one contains lines unique to FILE1, column<br \/>\ntwo contains lines unique to  FILE2,  and column three<br \/>\ncontains lines common to both files.<\/p>\n<p>Reference\/Source :<br \/>\nDebian manual for command \"comm\".<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>$comm sorta.txt sortb.txt d g comm: file 1 is not in sorted order e s x comm: file 2 is not in sorted order g s n $cat sorta.txt d g e s $cat sortb.txt x g s n $ $cat sorta.txt a b c d $cat sortb.txt a f g h $comm sorta.txt sortb.txt &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2010\/09\/26\/comm-compare-two-sorted-files-line-by-line\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;comm &#8211; compare two sorted files line by line&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[555,590,761,832,1462],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/3462"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=3462"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/3462\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=3462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=3462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=3462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}