{"id":20,"date":"2007-08-20T06:18:54","date_gmt":"2007-08-20T12:18:54","guid":{"rendered":"http:\/\/www.imed.ws\/blog\/2007\/08\/20\/how-to-trim-strings-using-awk\/"},"modified":"2007-08-20T06:18:54","modified_gmt":"2007-08-20T12:18:54","slug":"how-to-trim-strings-using-awk","status":"publish","type":"post","link":"https:\/\/www.imed.ws\/blog\/2007\/08\/20\/how-to-trim-strings-using-awk\/","title":{"rendered":"How to trim strings using awk"},"content":{"rendered":"<p>To trim space inside an awk inline script, the following command does the job:<\/p>\n<p><code>awk -F\"|\" '{gsub(\/ *$\/,\"\",$1);gsub(\/^ *\/,\"\",$1); print $1}<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To trim space inside an awk inline script, the following command does the job: awk -F&#8221;|&#8221; &#8216;{gsub(\/ *$\/,&#8221;&#8221;,$1);gsub(\/^ *\/,&#8221;&#8221;,$1); print $1}<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/www.imed.ws\/blog\/wp-json\/wp\/v2\/posts\/20"}],"collection":[{"href":"https:\/\/www.imed.ws\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.imed.ws\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.imed.ws\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.imed.ws\/blog\/wp-json\/wp\/v2\/comments?post=20"}],"version-history":[{"count":0,"href":"https:\/\/www.imed.ws\/blog\/wp-json\/wp\/v2\/posts\/20\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.imed.ws\/blog\/wp-json\/wp\/v2\/media?parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.imed.ws\/blog\/wp-json\/wp\/v2\/categories?post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.imed.ws\/blog\/wp-json\/wp\/v2\/tags?post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}