{"id":427,"date":"2006-04-15T03:36:06","date_gmt":"2006-04-15T10:36:06","guid":{"rendered":"http:\/\/coalface.mcslp.com\/?p=5"},"modified":"2006-04-15T03:36:06","modified_gmt":"2006-04-15T10:36:06","slug":"using-awk-with-different-inputoutput-separators","status":"publish","type":"post","link":"https:\/\/planet.mcb.guru\/?p=427","title":{"rendered":"Using awk with different input\/output separators"},"content":{"rendered":"<p>I had to reformat some stuff from the man pages for inclusion in another document that would be converted to a proper table. Here&#8217;s a trick for using awk\/gawk to take the input (multiple spaces) and output with tabs using different input and output separators.<\/p>\n<pre>\nBEGIN { OFS = \"t\"; FS = \"[ ][ ]+\" }\n{ print $1,$2,$3,$4 }<\/pre>\n<p>I only wanted the four columns from the original table, hence why I specified them explicitly here. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had to reformat some stuff from the man pages for inclusion in another document that would be converted to a proper table. Here&#8217;s a trick for using awk\/gawk to take the input (multiple spaces) and output with tabs using different input and output separators.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[36],"_links":{"self":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/posts\/427"}],"collection":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=427"}],"version-history":[{"count":0,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/posts\/427\/revisions"}],"wp:attachment":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}