{"id":22883,"date":"2008-04-03T10:00:00","date_gmt":"2008-04-03T10:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2008\/04\/03\/how-do-i-force-the-echo-command-to-echo\/"},"modified":"2008-04-03T10:00:00","modified_gmt":"2008-04-03T10:00:00","slug":"how-do-i-force-the-echo-command-to-echo","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20080403-00\/?p=22883","title":{"rendered":"How do I force the ECHO command to echo?"},"content":{"rendered":"<p>\nThe <code>ECHO<\/code> built-in command,\nhow much simpler could it get?\nIt takes whatever you put on the command line and prints it.\nAnd yet it&#8217;s not that simple.\n<\/p>\n<p>\nFor example, the <code>ECHO<\/code> must be careful not to compress\nwhitespace, because people will write\n<\/p>\n<pre>\nECHO Some text\nECHO    Indented text\nECHO             ----     underlined\n<\/pre>\n<p>\nand when you execute this, the result had better be\n<\/p>\n<pre>\nSome text\n   Indented text\n            ----     underlined\n<\/pre>\n<p>\nand not\n<\/p>\n<pre>\nSome text\nIndented text\n---- underlined\n<\/pre>\n<p>\nBut what if you want to echo a blank line or the word &#8220;ON&#8221; or &#8220;OFF&#8221;\nor a slash and a question mark?\n<\/p>\n<pre>\nC:\\&gt; ECHO ON\nC:\\&gt; ECHO\nECHO is on.\nC:\\&gt; ECHO \/?\nDisplays messages, or turns command-echoing on or off.\n...\n<\/pre>\n<p>\nTo force the <code>ECHO<\/code> command not to interpret its\narguments, put a dot immediately after the word &#8220;echo&#8221;:<\/p>\n<pre>\nC:\\&gt; ECHO.    ON\n    ON\nC:\\&gt; ECHO.\nC:\\&gt; ECHO.\/?\n\/?\n<\/pre>\n<p>\nThis is what happens when a language develops not by design but\nby evolution.\nIt becomes filled with all sorts of strange quirks in order\nto accommodate new behavior while remaining compatible with\nold behavior.\nNobody actually likes the batch language; they just are used to it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The ECHO built-in command, how much simpler could it get? It takes whatever you put on the command line and prints it. And yet it&#8217;s not that simple. For example, the ECHO must be careful not to compress whitespace, because people will write ECHO Some text ECHO Indented text ECHO &#8212;- underlined and when you [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[104],"class_list":["post-22883","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-tipssupport"],"acf":[],"blog_post_summary":"<p>The ECHO built-in command, how much simpler could it get? It takes whatever you put on the command line and prints it. And yet it&#8217;s not that simple. For example, the ECHO must be careful not to compress whitespace, because people will write ECHO Some text ECHO Indented text ECHO &#8212;- underlined and when you [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/22883","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=22883"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/22883\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=22883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=22883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=22883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}