{"id":4879,"date":"2021-07-14T00:58:29","date_gmt":"2021-07-14T03:58:29","guid":{"rendered":"https:\/\/bureau-it.com\/artigos\/utilizzando-leco\/"},"modified":"2024-09-19T22:33:48","modified_gmt":"2024-09-20T01:33:48","slug":"utilizzando-leco","status":"publish","type":"post","link":"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/","title":{"rendered":"Utilizzando l’eco"},"content":{"rendered":"\n

man<\/code> echo<\/code> \u00e8 molto diretto nel dire che il comando viene utilizzato per ripetere gli argomenti a std out.\nE questo significa passare praticamente qualsiasi cosa allo standard output.\nCon echo possiamo utilizzare caratteri di escape, come tabulazione, nuova riga, attivare i colori del testo, lo sfondo, la decorazione dei caratteri,<\/a> ecc. <\/p>\n\n

Fuga<\/h2>\n\n

Senza -e<\/strong>, non pu\u00f2 interpretare i comandi in escape.<\/p>\n\n

$ echo \"Oi\\nEu sou o Echo.\"\nOi\\nEu sou o Echo.<\/pre>\n\n

Con -e<\/strong>, abiliti l’interpretazione dei caratteri di escape, come ad esempio \\n per saltare le righe:<\/p>\n\n

$ echo -e \"Oi\\nEu sou o Echo.\"\nOi\nEu sou o Echo.<\/pre>\n\n

Per una nuova colonna ,<\/strong> usa l’opzione -e<\/strong> con \\v<\/strong>:<\/p>\n\n

$ Nome=\"Echo\"\n$ echo -e \"Oi\\nSeu nome \u00e9 $Nome \\v$Nome \\v$Nome\"\nOi\nSeu nome \u00e9 Echo\n                  Echo\n                         Echo<\/pre>\n\n

Per ri-tabulare usa l’opzione -e<\/strong> con \\t<\/strong>:<\/p>\n\n

$ echo -e \"\\tOl\u00e1,\\n\\tEste \u00e9 um texto tabulado.\"\n    Ol\u00e1,\n    Este \u00e9 um texto tabulado.<\/pre>\n\n

Evita i newline<\/h2>\n\n

Se non imposti l’opzione -n, le informazioni verranno visualizzate sullo schermo e poi apparir\u00e0 una nuova riga:<\/p>\n\n

$ echo \"Oi, digite seu nome: \"; read nome\nOi, digite seu nome: \n_<\/pre>\n\n

Ora, con -n, non c’\u00e8 pi\u00f9 la riga<\/em> dopo la frase:<\/p>\n\n

$ echo -n \"Oi, digite seu nome: \"; read nome\nOi, digite seu nome: _ <\/pre>\n\n

echo<\/code> Questa nuova linea che si crea pu\u00f2 essere d’intralcio quando si tratta di ottenere l’esadecimale di un carattere<\/p>\n\n

$ echo -e A |hexdump\n0000000 41 0a <----- olha o newline aqui no 0a, atrapalhando\n0000002\n\n$ echo -en A |hexdump\n0000000 41 <----- agora, s\u00f3 o hex 41, que \u00e9 o A em ascii\n0000001<\/pre>\n\n

Hai qualche suggerimento su come utilizzare l’eco?\nInviameli nei commenti e li inserir\u00f2 qui =D <\/p>\n","protected":false},"excerpt":{"rendered":"

Una guida rapida su come utilizzare il comando echo nel modo pi\u00f9 pratico possibile.<\/p>\n","protected":false},"author":2,"featured_media":4623,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"resumo_insta":"","imagem_insta":"","acessibilidade_insta":"","hashtags_insta":"","resumo_linkedin":"","imagem_linkedin":"","hashtag_linkedin":"","resumo_face":"","imagem_face":"","hashtag_face":"","footnotes":""},"categories":[91],"tags":[92],"class_list":["post-4879","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-script-di-shell","tag-eco"],"yoast_head":"\nUtilizzando l'eco - bureau-it.com<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/\" \/>\n<meta property=\"og:locale\" content=\"it_IT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Utilizzando l'eco - bureau-it.com\" \/>\n<meta property=\"og:description\" content=\"Una guida rapida su come utilizzare il comando echo nel modo pi\u00f9 pratico possibile.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/\" \/>\n<meta property=\"og:site_name\" content=\"bureau-it.com\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-14T03:58:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-20T01:33:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/echo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"541\" \/>\n\t<meta property=\"og:image:height\" content=\"279\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Daniel Cambr\u00eda\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Scritto da\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daniel Cambr\u00eda\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tempo di lettura stimato\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minuto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"NewsArticle\"],\"@id\":\"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/\"},\"author\":{\"name\":\"Daniel Cambr\u00eda\",\"@id\":\"https:\/\/bureau-it.com\/it\/#\/schema\/person\/c329412c3ef15c08d403bf4835dca2a5\"},\"headline\":\"Utilizzando l’eco\",\"datePublished\":\"2021-07-14T03:58:29+00:00\",\"dateModified\":\"2024-09-20T01:33:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/\"},\"wordCount\":165,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/bureau-it.com\/it\/#organization\"},\"image\":{\"@id\":\"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/echo.png\",\"keywords\":[\"eco\"],\"articleSection\":[\"script di shell\"],\"inLanguage\":\"it-IT\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#respond\"]}],\"copyrightYear\":\"2021\",\"copyrightHolder\":{\"@id\":\"https:\/\/bureau-it.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/\",\"url\":\"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/\",\"name\":\"Utilizzando l'eco - bureau-it.com\",\"isPartOf\":{\"@id\":\"https:\/\/bureau-it.com\/it\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/echo.png\",\"datePublished\":\"2021-07-14T03:58:29+00:00\",\"dateModified\":\"2024-09-20T01:33:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#breadcrumb\"},\"inLanguage\":\"it-IT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#primaryimage\",\"url\":\"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/echo.png\",\"contentUrl\":\"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/echo.png\",\"width\":541,\"height\":279},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/bureau-it.com\/it\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Utilizzando l’eco\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/bureau-it.com\/it\/#website\",\"url\":\"https:\/\/bureau-it.com\/it\/\",\"name\":\"bureau-it.com\",\"description\":\"Bureau IT | Bureau de Tecnologia\",\"publisher\":{\"@id\":\"https:\/\/bureau-it.com\/it\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/bureau-it.com\/it\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"it-IT\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/bureau-it.com\/it\/#organization\",\"name\":\"Bureau IT\",\"alternateName\":\"Bureau de Tecnologia\",\"url\":\"https:\/\/bureau-it.com\/it\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\/\/bureau-it.com\/it\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/bureau-it.com__icone-bbk-abk-itgreen-1.png\",\"contentUrl\":\"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/bureau-it.com__icone-bbk-abk-itgreen-1.png\",\"width\":496,\"height\":497,\"caption\":\"Bureau IT\"},\"image\":{\"@id\":\"https:\/\/bureau-it.com\/it\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/bureau-it\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/bureau-it.com\/it\/#\/schema\/person\/c329412c3ef15c08d403bf4835dca2a5\",\"name\":\"Daniel Cambr\u00eda\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\/\/bureau-it.com\/it\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/bureau-it.com\/wp-content\/uploads\/2024\/11\/cropped-dani-43-96x96.jpeg\",\"contentUrl\":\"https:\/\/bureau-it.com\/wp-content\/uploads\/2024\/11\/cropped-dani-43-96x96.jpeg\",\"caption\":\"Daniel Cambr\u00eda\"},\"description\":\"CEO e CTO do Bureau IT, come\u00e7ou na tecnologia aos 13 anos e vem de uma fam\u00edlia empreendedora. Com experi\u00eancia t\u00e9cnica e de gest\u00e3o, dedica-se \u00e0 m\u00fasica nas horas vagas e cuida de seus cinco gatos, unindo tecnologia, arte e boas companhias.\",\"url\":\"https:\/\/bureau-it.com\/it\/artigos\/author\/daniel-cambria\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Utilizzando l'eco - bureau-it.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/","og_locale":"it_IT","og_type":"article","og_title":"Utilizzando l'eco - bureau-it.com","og_description":"Una guida rapida su come utilizzare il comando echo nel modo pi\u00f9 pratico possibile.","og_url":"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/","og_site_name":"bureau-it.com","article_published_time":"2021-07-14T03:58:29+00:00","article_modified_time":"2024-09-20T01:33:48+00:00","og_image":[{"width":541,"height":279,"url":"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/echo.png","type":"image\/png"}],"author":"Daniel Cambr\u00eda","twitter_card":"summary_large_image","twitter_misc":{"Scritto da":"Daniel Cambr\u00eda","Tempo di lettura stimato":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","NewsArticle"],"@id":"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#article","isPartOf":{"@id":"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/"},"author":{"name":"Daniel Cambr\u00eda","@id":"https:\/\/bureau-it.com\/it\/#\/schema\/person\/c329412c3ef15c08d403bf4835dca2a5"},"headline":"Utilizzando l’eco","datePublished":"2021-07-14T03:58:29+00:00","dateModified":"2024-09-20T01:33:48+00:00","mainEntityOfPage":{"@id":"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/"},"wordCount":165,"commentCount":0,"publisher":{"@id":"https:\/\/bureau-it.com\/it\/#organization"},"image":{"@id":"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#primaryimage"},"thumbnailUrl":"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/echo.png","keywords":["eco"],"articleSection":["script di shell"],"inLanguage":"it-IT","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#respond"]}],"copyrightYear":"2021","copyrightHolder":{"@id":"https:\/\/bureau-it.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/","url":"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/","name":"Utilizzando l'eco - bureau-it.com","isPartOf":{"@id":"https:\/\/bureau-it.com\/it\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#primaryimage"},"image":{"@id":"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#primaryimage"},"thumbnailUrl":"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/echo.png","datePublished":"2021-07-14T03:58:29+00:00","dateModified":"2024-09-20T01:33:48+00:00","breadcrumb":{"@id":"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#breadcrumb"},"inLanguage":"it-IT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/"]}]},{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#primaryimage","url":"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/echo.png","contentUrl":"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/echo.png","width":541,"height":279},{"@type":"BreadcrumbList","@id":"https:\/\/bureau-it.com\/it\/artigos\/utilizzando-leco\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/bureau-it.com\/it\/"},{"@type":"ListItem","position":2,"name":"Utilizzando l’eco"}]},{"@type":"WebSite","@id":"https:\/\/bureau-it.com\/it\/#website","url":"https:\/\/bureau-it.com\/it\/","name":"bureau-it.com","description":"Bureau IT | Bureau de Tecnologia","publisher":{"@id":"https:\/\/bureau-it.com\/it\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bureau-it.com\/it\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"it-IT"},{"@type":"Organization","@id":"https:\/\/bureau-it.com\/it\/#organization","name":"Bureau IT","alternateName":"Bureau de Tecnologia","url":"https:\/\/bureau-it.com\/it\/","logo":{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/bureau-it.com\/it\/#\/schema\/logo\/image\/","url":"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/bureau-it.com__icone-bbk-abk-itgreen-1.png","contentUrl":"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/bureau-it.com__icone-bbk-abk-itgreen-1.png","width":496,"height":497,"caption":"Bureau IT"},"image":{"@id":"https:\/\/bureau-it.com\/it\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/bureau-it\/"]},{"@type":"Person","@id":"https:\/\/bureau-it.com\/it\/#\/schema\/person\/c329412c3ef15c08d403bf4835dca2a5","name":"Daniel Cambr\u00eda","image":{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/bureau-it.com\/it\/#\/schema\/person\/image\/","url":"https:\/\/bureau-it.com\/wp-content\/uploads\/2024\/11\/cropped-dani-43-96x96.jpeg","contentUrl":"https:\/\/bureau-it.com\/wp-content\/uploads\/2024\/11\/cropped-dani-43-96x96.jpeg","caption":"Daniel Cambr\u00eda"},"description":"CEO e CTO do Bureau IT, come\u00e7ou na tecnologia aos 13 anos e vem de uma fam\u00edlia empreendedora. Com experi\u00eancia t\u00e9cnica e de gest\u00e3o, dedica-se \u00e0 m\u00fasica nas horas vagas e cuida de seus cinco gatos, unindo tecnologia, arte e boas companhias.","url":"https:\/\/bureau-it.com\/it\/artigos\/author\/daniel-cambria\/"}]}},"_links":{"self":[{"href":"https:\/\/bureau-it.com\/it\/wp-json\/wp\/v2\/posts\/4879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bureau-it.com\/it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bureau-it.com\/it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bureau-it.com\/it\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bureau-it.com\/it\/wp-json\/wp\/v2\/comments?post=4879"}],"version-history":[{"count":0,"href":"https:\/\/bureau-it.com\/it\/wp-json\/wp\/v2\/posts\/4879\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bureau-it.com\/it\/wp-json\/wp\/v2\/media\/4623"}],"wp:attachment":[{"href":"https:\/\/bureau-it.com\/it\/wp-json\/wp\/v2\/media?parent=4879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bureau-it.com\/it\/wp-json\/wp\/v2\/categories?post=4879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bureau-it.com\/it\/wp-json\/wp\/v2\/tags?post=4879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}