{"id":7771,"date":"2014-06-28T05:06:15","date_gmt":"2014-06-27T19:06:15","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=7771"},"modified":"2014-06-28T05:06:15","modified_gmt":"2014-06-27T19:06:15","slug":"linux-awk-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/linux-awk-primer-tutorial\/","title":{"rendered":"Linux awk Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Linux\/awk\/Linux_awk.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Linux awk Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Linux\/awk\/Linux_awk.jpg\" title=\"Linux awk Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Linux awk Primer Tutorial<\/p><\/div>\n<p>The Linux (or unix) command <a target=_blank title='awk' href='http:\/\/pic.dhe.ibm.com\/infocenter\/zos\/v1r13\/index.jsp?topic=%2Fcom.ibm.zos.r13.bpxa500%2Fawk.htm'><i>awk<\/i><\/a> is a powerful command line tool which opens up a whole world of possibilities on the command line and is specially suited to be part of a piped command.<\/p>\n<p>The use of awk allows for many of the functionality thoughts you may have performed via a C command line program, but awk is an interpretive language tool, so it is very easy and quick to implement in your shell scripting work.<\/p>\n<p>For today&#8217;s tutorial we set awk off to make the task of writing a report about the company takings a doddle.   In two parts on the one command line (with sort) it manages to pare the data down to a simple useful report with the takings sorted by quantity and the cash register, which is implied by the record order of the CSV file, is also included via an awk operation.<\/p>\n<p>As with all Linux command line commands <i>man awk<\/i> can help you find out more.<\/p>\n<p>Some good background reading here would be:<\/p>\n<ul>\n<li><a target=_blank title='diff' href='http:\/\/pic.dhe.ibm.com\/infocenter\/zos\/v1r13\/index.jsp?topic=%2Fcom.ibm.zos.r13.bpxa500%2Fawk.htm'>awk<\/a> (Linux or unix awk command)<\/li>\n<\/ul>\n<p>Here is a link to some downloadable Korn shell script you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Linux\/awk\/myawk.ksh_GETME\" title='myawk.ksh'>myawk.ksh<\/a><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d5435' onclick='var dv=document.getElementById(\"d5435\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=Linux\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d5435' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Linux (or unix) command awk is a powerful command line tool which opens up a whole world of possibilities on the command line and is specially suited to be part of a piped command. The use of awk allows &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/linux-awk-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,29,37],"tags":[122,234,707,997,1319],"class_list":["post-7771","post","type-post","status-publish","format-standard","hentry","category-elearning","category-operating-system","category-tutorials","tag-awk","tag-command-line","tag-linux","tag-programming","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/7771"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=7771"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/7771\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=7771"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=7771"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=7771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}