{"id":185,"date":"2021-03-05T19:30:14","date_gmt":"2021-03-05T22:30:14","guid":{"rendered":"http:\/\/humanizati.com.br\/blog\/?p=185"},"modified":"2021-03-05T19:36:14","modified_gmt":"2021-03-05T22:36:14","slug":"string-explode-em-shell","status":"publish","type":"post","link":"https:\/\/humanizati.com.br\/blog\/2021\/03\/05\/string-explode-em-shell\/","title":{"rendered":"String Explode em Shell"},"content":{"rendered":"\n<p>O titulo \u00e9 uma maneira de identificar a necessidade. \ud83d\ude42<br>O que queremos \u00e9 quebrar uma vari\u00e1vel \u00fanica por\u00e9m que possui um padr\u00e3o de &#8220;jun\u00e7\u00e3o&#8221; (como por exemplo um h\u00edfen) em duas vari\u00e1veis.<\/p>\n\n\n\n<p><code>IN=\"nome-sobrenome\"<br>echo ADD1=`echo $IN | cut -d \\; -f 1`<br>echo ADD2=`echo $IN | cut -d \\; -f 2`<\/code><\/p>\n\n\n\n<p>Nesse contexto teremos ADD1 e ADD2 respectivamente separados pelo identificador\/padr\u00e3o de jun\u00e7\u00e3o.<\/p>\n\n\n\n<p>Lembrando que podemos expandir o quanto precisarmos basta mudarmos o valor da op\u00e7\u00e3o &#8220;-f&#8221; para a posi\u00e7\u00e3o que desejamos capturar.<\/p>\n\n\n\n<p>\ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>O titulo \u00e9 uma maneira de identificar a necessidade. \ud83d\ude42O que queremos \u00e9 quebrar uma vari\u00e1vel \u00fanica por\u00e9m que possui um padr\u00e3o de &#8220;jun\u00e7\u00e3o&#8221; (como&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-185","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/posts\/185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/comments?post=185"}],"version-history":[{"count":2,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/posts\/185\/revisions"}],"predecessor-version":[{"id":187,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/posts\/185\/revisions\/187"}],"wp:attachment":[{"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/media?parent=185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/categories?post=185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/humanizati.com.br\/blog\/wp-json\/wp\/v2\/tags?post=185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}