{"id":1770,"date":"2022-02-15T18:21:07","date_gmt":"2022-02-15T12:51:07","guid":{"rendered":"https:\/\/smarttech101.com\/?p=1770"},"modified":"2024-02-22T21:17:32","modified_gmt":"2024-02-22T15:47:32","slug":"echo-with-examples","status":"publish","type":"post","link":"https:\/\/smarttech101.com\/echo-with-examples\/","title":{"rendered":"Echo Command in Linux With Practical Examples"},"content":{"rendered":"\n<p class=\"\">In this article, I will talk about echo command in Linux with its examples and basic applications. I will also give a little information about <strong>special sequences, and quotes<\/strong> in Linux shell.<\/p>\n\n\n\n<p class=\"\"><strong>Note<\/strong>: Some shells have their own echo commands which are little different from the main echo command. This article is for <strong>bash&#8217;s echo<\/strong>. For other shells, there is not much difference. At the same time, I will also try my best to include these differences. And one more thing to note is that most of these commands should also work on any Unix-based system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Table of Contents<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"\"><a href=\"#basic-applications-of-echo-command-in-linux\">Basic Applications of Echo Command in Linux<\/a><\/li>\n\n\n\n<li class=\"\"><a href=\"#how-to-prevent-echo-from-appending-the-newline-n\">How to Prevent Echo From Appending the Newline (\\n)<\/a><\/li>\n\n\n\n<li class=\"\"><a href=\"#escape-sequences-in-echo-command-in-linux\">Escape Sequences in Echo Command in Linux<\/a>\n<ul class=\"wp-block-list\">\n<li class=\"\"><a href=\"#backspace-b-in-echo\">Backspace (\\b) in Echo<\/a><\/li>\n\n\n\n<li class=\"\"><a href=\"#carriage-return-r-in-echo\">Carriage Return (\\r) in Echo<\/a><\/li>\n\n\n\n<li class=\"\"><a href=\"#horizontal-tab-t-in-echo\">Horizontal Tab (\\t) in Echo<\/a><\/li>\n\n\n\n<li class=\"\"><a href=\"#vertical-tab-v-in-echo\">Vertical Tab (\\v) in Echo<\/a><\/li>\n\n\n\n<li class=\"\"><a href=\"#alert-a-in-echo\">Alert (\\a) in Echo<\/a><\/li>\n\n\n\n<li class=\"\"><a href=\"#c-in-echo\">\\c in Echo<\/a><\/li>\n\n\n\n<li class=\"\"><a href=\"#literal-backslash-in-echo\">Literal Backslash (\\) in Echo<\/a><\/li>\n\n\n\n<li class=\"\"><a href=\"#formfeed-f-in-echo\">Formfeed (\\f) in Echo<\/a><\/li>\n\n\n\n<li class=\"\"><a href=\"#octal-number-based-sequence-0nnn-in-echo\">Octal Number Based Sequence (\\0nnn) in Echo<\/a><\/li>\n\n\n\n<li class=\"\"><a href=\"#hexadecimal-number-based-sequence-xhh-in-echo\">Hexadecimal Number Based Sequence (\\xhh) in Echo<\/a><\/li>\n\n\n\n<li class=\"\"><a href=\"#escape-sequences-uhhhh-and-uhhhhhhhh-for-unicode-characters-in-echo\">Escape Sequences \\uhhhh and \\Uhhhhhhhh for Unicode Characters in Echo<\/a><\/li>\n\n\n\n<li class=\"\"><a href=\"#escape-character-e-or-e-in-echo\">Escape Character (\\e or \\E) in Echo<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li class=\"\"><a href=\"#wrapping-up\">Wrapping Up<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"basic-applications-of-echo-command-in-linux\">Basic Applications of Echo Command in Linux<\/h2>\n\n\n\n<p class=\"\">Syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo &#91;-neE] &#91;arg ...]<\/code><\/pre>\n\n\n\n<p class=\"\">In the above syntax, three dots (<code>...<\/code>) means you can have as many <code>arg<\/code> as possible. The execution of the above command will print all the &#8216;args&#8217; separated by space.<\/p>\n\n\n\n<p class=\"\">The simplest example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo \"hello world\"\nOutput:\nhello world<\/code><\/pre>\n\n\n\n<p class=\"\">In the above example, there is only one argument written under the quotes. If I remove the quotes, It becomes two separate arguments but the results would be the same. For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo hello world\nOutput:\nhello world<\/code><\/pre>\n\n\n\n<p class=\"\">The above example might tempt you to think that anything after the echo is printed out. But that is not true. All the POSIX compliant shells terminate any command at semicolon (<code>;<\/code>). So, echo can access argument only up to the semicolon (<code>;<\/code>), after that, the shell treats all the world(s) as a separate command(s). For example given below, our shell tries to execute the command called &#8216;world&#8217;, but it cannot find that command and hence it throws the error:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo hello world; world\nOutput:\nhello world\nbash: world: command not found<\/code><\/pre>\n\n\n\n<p class=\"\">To prevent this termination at the semicolon ( <code>;<\/code>), prepend the semicolon with a backslash as in the following example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo hello world\\; world\nOutput:\nhello world; world<\/code><\/pre>\n\n\n\n<p class=\"\">Given all the above issues associated with semicolons, backslashes, and quotes, you might get confused sometimes. This is true if you are a beginner. My suggestions would be to always use double quotes with the echo.<\/p>\n\n\n\n<p class=\"\">One more thing to note is that the meaning of &#8216;arg&#8217; is divers, it can be a parameter with <code>$<\/code> (ex &#8211; <code>$USER<\/code>), or an even command (ex &#8211; <code>$(date)<\/code>), or their mix-ups as shown below:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo \"hello $USER\"\nOutput:\nhello ajay\n&#91;ajay@lenovo ~]$ echo \"today's date is $(date)\"\nOutput:\ntoday's date is Tue Feb 15 12:35:40 AM IST 2022<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-prevent-echo-from-appending-the-newline-n\">How to Prevent Echo From Appending the Newline (\\n)<\/h2>\n\n\n\n<p class=\"\">In all of the above examples, as you can see, echo is inserting the newline (<code>\\n<\/code>) at the end. To remove that, we need to use the flag <code>-n<\/code>.<\/p>\n\n\n\n<p class=\"\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo -n \"line 1\"; echo -n \"line 2\"\nOutput:\nline 1line 2&#91;ajay@lenovo ~]$ <\/code><\/pre>\n\n\n\n<p class=\"\">The new line (<code>\\n<\/code>) is an escape sequence. There are others as well as shown under the next heading.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"escape-sequences-in-echo-command-in-linux\">Escape Sequences in Echo Command in Linux<\/h2>\n\n\n\n<p class=\"\">The escape sequences in echo start with the backlash. Most of these escape sequences, very often, are valid in other commands as well (ex &#8211; <a href=\"https:\/\/smarttech101.com\/printf-command-in-linux-with-examples-and-their-outputs\/\">printf<\/a>, gawk, python, etc.).<\/p>\n\n\n\n<p class=\"\">By default, these escape sequences are <strong>disabled in bash<\/strong> as shown below:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo \"hello\\nworld\"\nOutput:\nhello\\nworld<\/code><\/pre>\n\n\n\n<p class=\"\">To enable the interpretation of escape sequences, you need to use the flag <strong>-e<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo -e \"hello\\nworld\"\nOutput:\nhello\nworld<\/code><\/pre>\n\n\n\n<p class=\"\"><strong>Note<\/strong>: In <strong>dash<\/strong> shell, these escape sequences are disabled by default. On the other hand, in <strong>zsh<\/strong> shell, they are enabled. To disable it, use the flag <code>-E<\/code>.<\/p>\n\n\n\n<p class=\"\">After enabling the escape sequences, I will describe the types of escape sequences one by one with examples.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"backspace-b-in-echo\">Backspace (\\b) in Echo<\/h3>\n\n\n\n<p class=\"\">The backspace sequence deletes one character ahead of it. For example,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo -e \"first line\\bsecond line\"\nOutput:\nfirst linsecond line<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"carriage-return-r-in-echo\">Carriage Return (\\r) in Echo<\/h3>\n\n\n\n<p class=\"\">It puts the cursor at the beginning of the text. In the example given below, &#8216;NNNN&#8217;, then, replaces &#8216;firs&#8217;.<\/p>\n\n\n\n<p class=\"\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo -e \"first line \\rNNNN\"\nOutput:\nNNNNt line \n&#91;ajay@lenovo ~]$ <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"horizontal-tab-t-in-echo\">Horizontal Tab (\\t) in Echo<\/h3>\n\n\n\n<p class=\"\">The horizontal tab is what you see when you press the tab button in any text editor.<\/p>\n\n\n\n<p class=\"\">Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo -e \"word1 \\tword2\" \nOutput:\nword1     word2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"vertical-tab-v-in-echo\">Vertical Tab (\\v) in Echo<\/h3>\n\n\n\n<p class=\"\">This is best understandable by the following example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo -e \"word1 \\vword2\" \nOutput:\nword1 \n      word2<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"alert-a-in-echo\">Alert (\\a) in Echo<\/h3>\n\n\n\n<p class=\"\">This is also called a bell sequence. It does not print anything, instead, you will hear a beep sound.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo -e \"hello world \\a\"\nOutput:\nhello world <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"c-in-echo\">\\c in Echo<\/h3>\n\n\n\n<p class=\"\">It suppresses further output i.e. as soon as echo encounters <code>\\c<\/code>, echo does not print out anything.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo -e \"hello\\c world\" \nOutput:\nhello&#91;ajay@lenovo ~]$ <\/code><\/pre>\n\n\n\n<p class=\"\">Note: In the command gawk, &#8216;\\c&#8217; means a different thing.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"literal-backslash-in-echo\">Literal Backslash (\\\\) in Echo<\/h3>\n\n\n\n<p class=\"\">In order to print a single backslash, you will need to use double backslashes. Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo -e \"hello \\\\ world\"\nOutput:\nhello \\ world<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"formfeed-f-in-echo\">Formfeed (\\f) in Echo<\/h3>\n\n\n\n<p class=\"\">Technically, it directs the printer to advance down to the next &#8220;page&#8221;. But in the terminal, you will see the output similar to the vertical tab. I have not found its use yet. If you have any, please comment below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo -e \"hello \\f world\"\nOutput:\nhello \n       world<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"octal-number-based-sequence-0nnn-in-echo\">Octal Number Based Sequence (\\0nnn) in Echo<\/h3>\n\n\n\n<p class=\"\">Echo can also print out any character corresponding to the octal number &#8216;nnn&#8217;. Here the number &#8216;nnn&#8217; can have one to three digits. For example, &#8216;013&#8217; and &#8217;13&#8217; correspond to a vertical tab, &#8216;047&#8217; and &#8217;47&#8217; to a single quote, &#8216;042&#8217; and &#8217;42&#8217; to a double quote, and so on. Many of these<a href=\"https:\/\/www.sciencebuddies.org\/science-fair-projects\/references\/ascii-table\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"> characters and corresponding octal numbers can be found on this link.<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo -e \"hello \\0042world\\0042\"\nOutput:\nhello \"world\"\n&#91;ajay@lenovo ~]$ echo -e \"hello \\042world\\042\"\nOutput:\nhello \"world\"<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"hexadecimal-number-based-sequence-xhh-in-echo\">Hexadecimal Number Based Sequence (\\xhh) in Echo<\/h3>\n\n\n\n<p class=\"\">Here, echo prints the character corresponding to one or two digits hexadecimal number. For example, &#8216;0b&#8217; or &#8216;b&#8217; is the same as a vertical tab, &#8217;26&#8217; is the same as a single quote, and &#8217;22&#8217; is the same as a double quote, and so on. Other <a href=\"https:\/\/www.sciencebuddies.org\/science-fair-projects\/references\/ascii-table\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">matches between hexadecimal numbers and characters <\/a>can be found in the same hyperlink given above.<\/p>\n\n\n\n<p class=\"\">Examples:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ajay@lenovo ~]$ echo -e \"hello \\x22world\\x22\"\nOutput:\nhello \"world\"\n&#91;ajay@lenovo ~]$ echo -e \"hello \\xb world\"\nOutput:\nhello \n       world<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"escape-sequences-uhhhh-and-uhhhhhhhh-for-unicode-characters-in-echo\">Escape Sequences \\uhhhh and \\Uhhhhhhhh for Unicode Characters in Echo<\/h3>\n\n\n\n<p class=\"\">Here, HHHH  in <code>\\uHHHH<\/code> is a hexadecimal number from one to four digits. Similarly, HHHHHHHH in <code>\\uHHHHHHHH<\/code> is one to eight digits hexadecimal number.<\/p>\n\n\n\n<p class=\"\">When echo encounters these escape sequences, it prints the corresponding Unicode (ISO\/IEC 10646) character.<\/p>\n\n\n\n<p class=\"\">Examples:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"649\" height=\"253\" src=\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/02\/1644888603.png?resize=649%2C253&#038;ssl=1\" alt=\"Echo printing Unicode glyphs in Linux\" class=\"wp-image-1772\"\/><figcaption class=\"wp-element-caption\">Figure: Echo printing Unicode glyphs<\/figcaption><\/figure>\n\n\n\n<p class=\"\"><strong>Application<\/strong>: You can check, using the above commands, if your terminal such as <a href=\"https:\/\/smarttech101.com\/urxvt-installation-color-scheme-fonts-resize-etc\/\" target=\"_blank\" rel=\"noreferrer noopener\">urxvt<\/a> supports glyphs and colored glyphs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"escape-character-e-or-e-in-echo\">Escape Character (\\e or \\E) In Echo<\/h3>\n\n\n\n<p class=\"\">One very good application of the escape character is printing the output in color.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"615\" height=\"196\" src=\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/02\/2022-02-15_180609.888817204.png?resize=615%2C196&#038;ssl=1\" alt=\"echo printing out in colors in Linux\" class=\"wp-image-1778\"\/><figcaption class=\"wp-element-caption\">Figure: echo printing out in colors.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"wrapping-up\">Wrapping Up<\/h2>\n\n\n\n<p class=\"\">That&#8217;s all with the echo command in Linux with practical examples. If there are any mistakes, or if you have any confusion, please comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article is all about echo command with practical examples and a little information about escape sequences in Linux.<\/p>\n","protected":false},"author":2,"featured_media":1779,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[17],"tags":[18],"class_list":["post-1770","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-command-line-tools","tag-command-line-tools"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Echo Command in Linux With Practical Examples | SmartTech101<\/title>\n<meta name=\"description\" content=\"This article is all about echo command with practical examples and a little information about escape sequences in Linux.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/smarttech101.com\/echo-with-examples\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Echo Command in Linux With Practical Examples | SmartTech101\" \/>\n<meta property=\"og:description\" content=\"This article is all about echo command with practical examples and a little information about escape sequences in Linux.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/smarttech101.com\/echo-with-examples\/\" \/>\n<meta property=\"og:site_name\" content=\"SmartTech101\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-15T12:51:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-22T15:47:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/smarttech101.com\/wp-content\/uploads\/2022\/02\/echo-command-in-linux-with-practical-examples.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ajay\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ajay_yadav\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ajay\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/smarttech101.com\/echo-with-examples\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/smarttech101.com\/echo-with-examples\/\"},\"author\":{\"name\":\"Ajay\",\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/2edfee738a82f9c963210f8cdb438334\"},\"headline\":\"Echo Command in Linux With Practical Examples\",\"datePublished\":\"2022-02-15T12:51:07+00:00\",\"dateModified\":\"2024-02-22T15:47:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/smarttech101.com\/echo-with-examples\/\"},\"wordCount\":1047,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/e8d5aebc510d698e11e9df6291381633\"},\"image\":{\"@id\":\"https:\/\/smarttech101.com\/echo-with-examples\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/02\/echo-command-in-linux-with-practical-examples.png?fit=1280%2C720&ssl=1\",\"keywords\":[\"Command Line Tools\"],\"articleSection\":[\"Command Line Tools\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/smarttech101.com\/echo-with-examples\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/smarttech101.com\/echo-with-examples\/\",\"url\":\"https:\/\/smarttech101.com\/echo-with-examples\/\",\"name\":\"Echo Command in Linux With Practical Examples | SmartTech101\",\"isPartOf\":{\"@id\":\"https:\/\/smarttech101.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/smarttech101.com\/echo-with-examples\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/smarttech101.com\/echo-with-examples\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/02\/echo-command-in-linux-with-practical-examples.png?fit=1280%2C720&ssl=1\",\"datePublished\":\"2022-02-15T12:51:07+00:00\",\"dateModified\":\"2024-02-22T15:47:32+00:00\",\"description\":\"This article is all about echo command with practical examples and a little information about escape sequences in Linux.\",\"breadcrumb\":{\"@id\":\"https:\/\/smarttech101.com\/echo-with-examples\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/smarttech101.com\/echo-with-examples\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/smarttech101.com\/echo-with-examples\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/02\/echo-command-in-linux-with-practical-examples.png?fit=1280%2C720&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/02\/echo-command-in-linux-with-practical-examples.png?fit=1280%2C720&ssl=1\",\"width\":1280,\"height\":720,\"caption\":\"echo command in Linux with practical examples\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/smarttech101.com\/echo-with-examples\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/smarttech101.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Echo Command in Linux With Practical Examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/smarttech101.com\/#website\",\"url\":\"https:\/\/smarttech101.com\/\",\"name\":\"SmartTech101\",\"description\":\"Do Everything in Linux\",\"publisher\":{\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/e8d5aebc510d698e11e9df6291381633\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/smarttech101.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/e8d5aebc510d698e11e9df6291381633\",\"name\":\"Ajay Yadav\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/09\/cropped-ST101_logo.png?fit=180%2C60&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/09\/cropped-ST101_logo.png?fit=180%2C60&ssl=1\",\"width\":180,\"height\":60,\"caption\":\"Ajay Yadav\"},\"logo\":{\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/2edfee738a82f9c963210f8cdb438334\",\"name\":\"Ajay\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6eea348caae2173954765a7cdf6cd107?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6eea348caae2173954765a7cdf6cd107?s=96&d=mm&r=g\",\"caption\":\"Ajay\"},\"sameAs\":[\"https:\/\/x.com\/ajay_yadav\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Echo Command in Linux With Practical Examples | SmartTech101","description":"This article is all about echo command with practical examples and a little information about escape sequences in Linux.","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:\/\/smarttech101.com\/echo-with-examples\/","og_locale":"en_US","og_type":"article","og_title":"Echo Command in Linux With Practical Examples | SmartTech101","og_description":"This article is all about echo command with practical examples and a little information about escape sequences in Linux.","og_url":"https:\/\/smarttech101.com\/echo-with-examples\/","og_site_name":"SmartTech101","article_published_time":"2022-02-15T12:51:07+00:00","article_modified_time":"2024-02-22T15:47:32+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/smarttech101.com\/wp-content\/uploads\/2022\/02\/echo-command-in-linux-with-practical-examples.png","type":"image\/png"}],"author":"Ajay","twitter_card":"summary_large_image","twitter_creator":"@ajay_yadav","twitter_misc":{"Written by":"Ajay","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/smarttech101.com\/echo-with-examples\/#article","isPartOf":{"@id":"https:\/\/smarttech101.com\/echo-with-examples\/"},"author":{"name":"Ajay","@id":"https:\/\/smarttech101.com\/#\/schema\/person\/2edfee738a82f9c963210f8cdb438334"},"headline":"Echo Command in Linux With Practical Examples","datePublished":"2022-02-15T12:51:07+00:00","dateModified":"2024-02-22T15:47:32+00:00","mainEntityOfPage":{"@id":"https:\/\/smarttech101.com\/echo-with-examples\/"},"wordCount":1047,"commentCount":2,"publisher":{"@id":"https:\/\/smarttech101.com\/#\/schema\/person\/e8d5aebc510d698e11e9df6291381633"},"image":{"@id":"https:\/\/smarttech101.com\/echo-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/02\/echo-command-in-linux-with-practical-examples.png?fit=1280%2C720&ssl=1","keywords":["Command Line Tools"],"articleSection":["Command Line Tools"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/smarttech101.com\/echo-with-examples\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/smarttech101.com\/echo-with-examples\/","url":"https:\/\/smarttech101.com\/echo-with-examples\/","name":"Echo Command in Linux With Practical Examples | SmartTech101","isPartOf":{"@id":"https:\/\/smarttech101.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/smarttech101.com\/echo-with-examples\/#primaryimage"},"image":{"@id":"https:\/\/smarttech101.com\/echo-with-examples\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/02\/echo-command-in-linux-with-practical-examples.png?fit=1280%2C720&ssl=1","datePublished":"2022-02-15T12:51:07+00:00","dateModified":"2024-02-22T15:47:32+00:00","description":"This article is all about echo command with practical examples and a little information about escape sequences in Linux.","breadcrumb":{"@id":"https:\/\/smarttech101.com\/echo-with-examples\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/smarttech101.com\/echo-with-examples\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/smarttech101.com\/echo-with-examples\/#primaryimage","url":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/02\/echo-command-in-linux-with-practical-examples.png?fit=1280%2C720&ssl=1","contentUrl":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/02\/echo-command-in-linux-with-practical-examples.png?fit=1280%2C720&ssl=1","width":1280,"height":720,"caption":"echo command in Linux with practical examples"},{"@type":"BreadcrumbList","@id":"https:\/\/smarttech101.com\/echo-with-examples\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/smarttech101.com\/"},{"@type":"ListItem","position":2,"name":"Echo Command in Linux With Practical Examples"}]},{"@type":"WebSite","@id":"https:\/\/smarttech101.com\/#website","url":"https:\/\/smarttech101.com\/","name":"SmartTech101","description":"Do Everything in Linux","publisher":{"@id":"https:\/\/smarttech101.com\/#\/schema\/person\/e8d5aebc510d698e11e9df6291381633"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/smarttech101.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/smarttech101.com\/#\/schema\/person\/e8d5aebc510d698e11e9df6291381633","name":"Ajay Yadav","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/smarttech101.com\/#\/schema\/person\/image\/","url":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/09\/cropped-ST101_logo.png?fit=180%2C60&ssl=1","contentUrl":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/09\/cropped-ST101_logo.png?fit=180%2C60&ssl=1","width":180,"height":60,"caption":"Ajay Yadav"},"logo":{"@id":"https:\/\/smarttech101.com\/#\/schema\/person\/image\/"}},{"@type":"Person","@id":"https:\/\/smarttech101.com\/#\/schema\/person\/2edfee738a82f9c963210f8cdb438334","name":"Ajay","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/smarttech101.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6eea348caae2173954765a7cdf6cd107?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6eea348caae2173954765a7cdf6cd107?s=96&d=mm&r=g","caption":"Ajay"},"sameAs":["https:\/\/x.com\/ajay_yadav"]}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/02\/echo-command-in-linux-with-practical-examples.png?fit=1280%2C720&ssl=1","_links":{"self":[{"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/posts\/1770"}],"collection":[{"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/comments?post=1770"}],"version-history":[{"count":5,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/posts\/1770\/revisions"}],"predecessor-version":[{"id":3319,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/posts\/1770\/revisions\/3319"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/media\/1779"}],"wp:attachment":[{"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/media?parent=1770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/categories?post=1770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/tags?post=1770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}