{"id":40229,"date":"2019-11-11T09:03:19","date_gmt":"2019-11-11T09:03:19","guid":{"rendered":"https:\/\/www.cryptocabaret.com\/?p=40229"},"modified":"2019-11-11T09:03:19","modified_gmt":"2019-11-11T09:03:19","slug":"a-guide-to-intermediate-awk-scripting","status":"publish","type":"post","link":"https:\/\/www.cryptocabaret.com\/?p=40229","title":{"rendered":"A guide to intermediate awk scripting"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" typeof=\"foaf:Image\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2019\/11\/code_computer_laptop_hack_work.png\" width=\"1041\" height=\"584\" alt=\"Coding on a computer\" title=\"Coding on a computer\"><\/p>\n<p>This article explores&nbsp;awk&#8217;s capabilities, which are easier to use now that you know how to structure your command into an executable script.<\/p>\n<h2>Logical operators and conditionals<\/h2>\n<p>You can use the logical operators <strong>and<\/strong> (written <strong>&amp;&amp;<\/strong>) and <strong>or<\/strong> (written <strong>||<\/strong>) to add specificity to your conditionals.<\/p>\n<p>For example, to select and print only records with the string &#8220;purple&#8221; in the second column <em>and<\/em> an amount less than five in the third column:<\/p>\n<p><a href=\"https:\/\/opensource.com\/article\/19\/11\/intermediate-awk-scripting\">read more<\/a><br \/><ins class=\"adbladeads\" data-cid=\"24663-3514371590\" data-host=\"web.adblade.com\" data-tag-type=\"4\" style=\"display:none\"><\/ins><br \/>\n<script async src=\"http:\/\/web.adblade.com\/js\/ads\/async\/show.js\" type=\"text\/javascript\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article explores&nbsp;awk&#8217;s capabilities, which are easier to use now that you know how to structure your command into an executable script. Logical operators and conditionals You can use the logical operators and (written &amp;&amp;) and or (written ||) to add specificity to your conditionals. For example, to select and print only records with the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":40230,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[307],"tags":[],"class_list":["post-40229","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-open-source"],"_links":{"self":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/40229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=40229"}],"version-history":[{"count":0,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/40229\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/media\/40230"}],"wp:attachment":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=40229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=40229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=40229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}