{"id":4881,"date":"2021-07-14T00:58:29","date_gmt":"2021-07-14T03:58:29","guid":{"rendered":"https:\/\/bureau-it.com\/artigos\/utilisation-de-lecho\/"},"modified":"2024-09-19T22:33:49","modified_gmt":"2024-09-20T01:33:49","slug":"utilisation-de-lecho","status":"publish","type":"post","link":"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/","title":{"rendered":"Utilisation de l’\u00e9cho"},"content":{"rendered":"\n

man<\/code> echo<\/code> est tr\u00e8s direct en disant que la commande est utilis\u00e9e pour r\u00e9p\u00e9ter les arguments vers std out.\nCela signifie qu’il est possible de passer pratiquement n’importe quoi \u00e0 la sortie standard.\nAvec echo, nous pouvons utiliser des caract\u00e8res d’\u00e9chappement, tels que la tabulation, le retour \u00e0 la ligne, activer les couleurs du texte, l’arri\u00e8re-plan, la d\u00e9coration des caract\u00e8res,<\/a> etc. <\/p>\n\n

S’\u00e9vader<\/h2>\n\n

Sans -e<\/strong>, il ne peut pas interpr\u00e9ter les commandes \u00e9chapp\u00e9es.<\/p>\n\n

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

Avec -e<\/strong>, vous activez l’interpr\u00e9tation des caract\u00e8res \u00e9chapp\u00e9s, tels que \\n pour sauter des lignes :<\/p>\n\n

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

Pour une nouvelle colonne ,<\/strong> utilisez l’option -e<\/strong> avec \\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

Pour re-tabler, utilisez l’option -e<\/strong> avec \\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

\u00c9vitez les retours \u00e0 la ligne<\/h2>\n\n

Si vous n’utilisez pas l’option -n, l’information sera affich\u00e9e \u00e0 l’\u00e9cran, puis une nouvelle ligne appara\u00eetra :<\/p>\n\n

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

Maintenant, avec -n, nous n’avons plus de nouvelle ligne<\/em> apr\u00e8s la phrase :<\/p>\n\n

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

echo<\/code> Cette nouvelle ligne cr\u00e9\u00e9e peut \u00eatre g\u00eanante lorsqu’il s’agit d’obtenir l’hexad\u00e9cimal d’un caract\u00e8re<\/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

Avez-vous des suggestions sur la fa\u00e7on d’utiliser echo ?\nEnvoyez-la-moi dans les commentaires et je l’ins\u00e9rerai ici =D <\/p>\n","protected":false},"excerpt":{"rendered":"

Un guide rapide sur l’utilisation de la commande echo de la mani\u00e8re la plus pratique possible.<\/p>\n","protected":false},"author":2,"featured_media":4622,"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":[93],"tags":[94],"class_list":["post-4881","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-script-shell","tag-echo-fr"],"yoast_head":"\nUtilisation de l'\u00e9cho - 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\/fr\/artigos\/utilisation-de-lecho\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Utilisation de l'\u00e9cho - bureau-it.com\" \/>\n<meta property=\"og:description\" content=\"Un guide rapide sur l'utilisation de la commande echo de la mani\u00e8re la plus pratique possible.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/\" \/>\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:49+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=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daniel Cambr\u00eda\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"NewsArticle\"],\"@id\":\"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/\"},\"author\":{\"name\":\"Daniel Cambr\u00eda\",\"@id\":\"https:\/\/bureau-it.com\/fr\/#\/schema\/person\/c329412c3ef15c08d403bf4835dca2a5\"},\"headline\":\"Utilisation de l’\u00e9cho\",\"datePublished\":\"2021-07-14T03:58:29+00:00\",\"dateModified\":\"2024-09-20T01:33:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/\"},\"wordCount\":207,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/bureau-it.com\/fr\/#organization\"},\"image\":{\"@id\":\"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/echo.png\",\"keywords\":[\"\u00e9cho\"],\"articleSection\":[\"script shell\"],\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/#respond\"]}],\"copyrightYear\":\"2021\",\"copyrightHolder\":{\"@id\":\"https:\/\/bureau-it.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/\",\"url\":\"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/\",\"name\":\"Utilisation de l'\u00e9cho - bureau-it.com\",\"isPartOf\":{\"@id\":\"https:\/\/bureau-it.com\/fr\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/#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:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/#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\/fr\/artigos\/utilisation-de-lecho\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/bureau-it.com\/fr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Utilisation de l’\u00e9cho\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/bureau-it.com\/fr\/#website\",\"url\":\"https:\/\/bureau-it.com\/fr\/\",\"name\":\"bureau-it.com\",\"description\":\"Bureau IT | Bureau de Tecnologia\",\"publisher\":{\"@id\":\"https:\/\/bureau-it.com\/fr\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/bureau-it.com\/fr\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/bureau-it.com\/fr\/#organization\",\"name\":\"Bureau IT\",\"alternateName\":\"Bureau de Tecnologia\",\"url\":\"https:\/\/bureau-it.com\/fr\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/bureau-it.com\/fr\/#\/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\/fr\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/bureau-it\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/bureau-it.com\/fr\/#\/schema\/person\/c329412c3ef15c08d403bf4835dca2a5\",\"name\":\"Daniel Cambr\u00eda\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/bureau-it.com\/fr\/#\/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\/fr\/artigos\/author\/daniel-cambria\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Utilisation de l'\u00e9cho - 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\/fr\/artigos\/utilisation-de-lecho\/","og_locale":"fr_FR","og_type":"article","og_title":"Utilisation de l'\u00e9cho - bureau-it.com","og_description":"Un guide rapide sur l'utilisation de la commande echo de la mani\u00e8re la plus pratique possible.","og_url":"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/","og_site_name":"bureau-it.com","article_published_time":"2021-07-14T03:58:29+00:00","article_modified_time":"2024-09-20T01:33:49+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":{"\u00c9crit par":"Daniel Cambr\u00eda","Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","NewsArticle"],"@id":"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/#article","isPartOf":{"@id":"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/"},"author":{"name":"Daniel Cambr\u00eda","@id":"https:\/\/bureau-it.com\/fr\/#\/schema\/person\/c329412c3ef15c08d403bf4835dca2a5"},"headline":"Utilisation de l’\u00e9cho","datePublished":"2021-07-14T03:58:29+00:00","dateModified":"2024-09-20T01:33:49+00:00","mainEntityOfPage":{"@id":"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/"},"wordCount":207,"commentCount":0,"publisher":{"@id":"https:\/\/bureau-it.com\/fr\/#organization"},"image":{"@id":"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/#primaryimage"},"thumbnailUrl":"https:\/\/bureau-it.com\/wp-content\/uploads\/2021\/07\/echo.png","keywords":["\u00e9cho"],"articleSection":["script shell"],"inLanguage":"fr-FR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/#respond"]}],"copyrightYear":"2021","copyrightHolder":{"@id":"https:\/\/bureau-it.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/","url":"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/","name":"Utilisation de l'\u00e9cho - bureau-it.com","isPartOf":{"@id":"https:\/\/bureau-it.com\/fr\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/#primaryimage"},"image":{"@id":"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/#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:49+00:00","breadcrumb":{"@id":"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/bureau-it.com\/fr\/artigos\/utilisation-de-lecho\/#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\/fr\/artigos\/utilisation-de-lecho\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/bureau-it.com\/fr\/"},{"@type":"ListItem","position":2,"name":"Utilisation de l’\u00e9cho"}]},{"@type":"WebSite","@id":"https:\/\/bureau-it.com\/fr\/#website","url":"https:\/\/bureau-it.com\/fr\/","name":"bureau-it.com","description":"Bureau IT | Bureau de Tecnologia","publisher":{"@id":"https:\/\/bureau-it.com\/fr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bureau-it.com\/fr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/bureau-it.com\/fr\/#organization","name":"Bureau IT","alternateName":"Bureau de Tecnologia","url":"https:\/\/bureau-it.com\/fr\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/bureau-it.com\/fr\/#\/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\/fr\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/bureau-it\/"]},{"@type":"Person","@id":"https:\/\/bureau-it.com\/fr\/#\/schema\/person\/c329412c3ef15c08d403bf4835dca2a5","name":"Daniel Cambr\u00eda","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/bureau-it.com\/fr\/#\/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\/fr\/artigos\/author\/daniel-cambria\/"}]}},"_links":{"self":[{"href":"https:\/\/bureau-it.com\/fr\/wp-json\/wp\/v2\/posts\/4881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bureau-it.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bureau-it.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bureau-it.com\/fr\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bureau-it.com\/fr\/wp-json\/wp\/v2\/comments?post=4881"}],"version-history":[{"count":0,"href":"https:\/\/bureau-it.com\/fr\/wp-json\/wp\/v2\/posts\/4881\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bureau-it.com\/fr\/wp-json\/wp\/v2\/media\/4622"}],"wp:attachment":[{"href":"https:\/\/bureau-it.com\/fr\/wp-json\/wp\/v2\/media?parent=4881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bureau-it.com\/fr\/wp-json\/wp\/v2\/categories?post=4881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bureau-it.com\/fr\/wp-json\/wp\/v2\/tags?post=4881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}