{"id":60,"date":"2018-11-01T15:45:01","date_gmt":"2018-11-01T22:45:01","guid":{"rendered":"https:\/\/angrysysadmins.tech\/?p=60"},"modified":"2019-03-15T19:36:35","modified_gmt":"2019-03-16T03:36:35","slug":"list-escape-characters-sequences","status":"publish","type":"post","link":"https:\/\/angrysysadmins.tech\/index.php\/2018\/11\/bailey\/list-escape-characters-sequences\/","title":{"rendered":"Bailey&#8217;s Big List of Escape Characters and Sequences"},"content":{"rendered":"\n<p>Escaping special characters is generally pretty straight forward, just throw the correct character in front of the problem, and it should solve itself. Sometimes it gets a bit weird though, and also sometimes it is difficult to find the correct way of doing something. I plan for this to be a live document that I update as I find things, so it will start small and grow. Feel free to comment below if you have something to add.<br><br><\/p>\n\n\n\n<p class=\"has-large-font-size\">Nagios<br><br><\/p>\n\n\n\n<p>Nagios has a mix of standard and weird escape sequences, and little documentation on how to handle them. As I come across each type, normal and strange, I&#8217;ll list them here.<\/p>\n\n\n\n<table class=\"wp-block-table is-style-regular\"><tbody><tr><td>Desired Result<\/td><td>Escape Sequence<\/td><\/tr><tr><td>Standard escape<\/td><td>\\<\/td><\/tr><tr><td>;<\/td><td>\\;<\/td><\/tr><tr><td>!<\/td><td>\\!<\/td><\/tr><tr><td>$<\/td><td>$$<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p class=\"has-large-font-size\">Batch<br><br><\/p>\n\n\n\n<p>Definitely fewer weird situations than Nagios, but it does have a few that took a bit to find the solution to.<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>Desired Result<\/td><td>Escape Sequence<\/td><\/tr><tr><td>% in a string<br><\/td><td>%%<\/td><\/tr><tr><td>&gt; in a for loop<\/td><td>^&gt;<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p class=\"has-large-font-size\">PowerShell<\/p>\n\n\n\n<p>PowerShell enjoys being different and that applies to it&#8217;s escape character as well.<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>Desired Result<\/td><td>Escape Sequence<\/td><\/tr><tr><td>Standard escape<\/td><td>` (Grave\/back tick)<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p class=\"has-large-font-size\">Golang<br><br><\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>Desired Result<\/td><td>Escape Sequence<br><\/td><\/tr><tr><td>Literal string<\/td><td>&#8220; (Grave\/back tick)&nbsp;<\/td><\/tr><tr><td>Standard escape<\/td><td>\\<\/td><\/tr><\/tbody><\/table>\n","protected":false},"excerpt":{"rendered":"<p>Escaping special characters is generally pretty straight forward, just throw the correct character in front of the problem, and it should solve itself. Sometimes it gets a bit weird though, and also sometimes it is difficult to find the correct way of doing something. I plan for this to be a live document that I <br \/><a class=\"read-more-button\" href=\"https:\/\/angrysysadmins.tech\/index.php\/2018\/11\/bailey\/list-escape-characters-sequences\/\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43,44,42,23,40],"tags":[25,27,24,26],"coauthors":[37],"class_list":["post-60","post","type-post","status-publish","format-standard","hentry","category-bash","category-batch","category-powershell","category-programming","category-scripting","tag-batch","tag-escape","tag-nagios","tag-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Bailey&#039;s Big List of Escape Characters and Sequences - Angry Sysadmins<\/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:\/\/angrysysadmins.tech\/index.php\/2018\/11\/bailey\/list-escape-characters-sequences\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Bailey&#039;s Big List of Escape Characters and Sequences - Angry Sysadmins\" \/>\n<meta property=\"og:description\" content=\"Escaping special characters is generally pretty straight forward, just throw the correct character in front of the problem, and it should solve itself. Sometimes it gets a bit weird though, and also sometimes it is difficult to find the correct way of doing something. I plan for this to be a live document that I Read More &raquo;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/angrysysadmins.tech\/index.php\/2018\/11\/bailey\/list-escape-characters-sequences\/\" \/>\n<meta property=\"og:site_name\" content=\"Angry Sysadmins\" \/>\n<meta property=\"article:published_time\" content=\"2018-11-01T22:45:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-03-16T03:36:35+00:00\" \/>\n<meta name=\"author\" content=\"Cat Kasin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Cat Kasin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\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\",\"@id\":\"https:\\\/\\\/angrysysadmins.tech\\\/index.php\\\/2018\\\/11\\\/bailey\\\/list-escape-characters-sequences\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/angrysysadmins.tech\\\/index.php\\\/2018\\\/11\\\/bailey\\\/list-escape-characters-sequences\\\/\"},\"author\":{\"name\":\"Cat Kasin\",\"@id\":\"https:\\\/\\\/angrysysadmins.tech\\\/#\\\/schema\\\/person\\\/151b2d23439b55b970060836f317a14d\"},\"headline\":\"Bailey&#8217;s Big List of Escape Characters and Sequences\",\"datePublished\":\"2018-11-01T22:45:01+00:00\",\"dateModified\":\"2019-03-16T03:36:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/angrysysadmins.tech\\\/index.php\\\/2018\\\/11\\\/bailey\\\/list-escape-characters-sequences\\\/\"},\"wordCount\":198,\"commentCount\":1,\"keywords\":[\"batch\",\"escape\",\"nagios\",\"programming\"],\"articleSection\":[\"Bash\",\"Batch\",\"Powershell\",\"Programming\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/angrysysadmins.tech\\\/index.php\\\/2018\\\/11\\\/bailey\\\/list-escape-characters-sequences\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/angrysysadmins.tech\\\/index.php\\\/2018\\\/11\\\/bailey\\\/list-escape-characters-sequences\\\/\",\"url\":\"https:\\\/\\\/angrysysadmins.tech\\\/index.php\\\/2018\\\/11\\\/bailey\\\/list-escape-characters-sequences\\\/\",\"name\":\"Bailey's Big List of Escape Characters and Sequences - Angry Sysadmins\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/angrysysadmins.tech\\\/#website\"},\"datePublished\":\"2018-11-01T22:45:01+00:00\",\"dateModified\":\"2019-03-16T03:36:35+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/angrysysadmins.tech\\\/#\\\/schema\\\/person\\\/151b2d23439b55b970060836f317a14d\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/angrysysadmins.tech\\\/index.php\\\/2018\\\/11\\\/bailey\\\/list-escape-characters-sequences\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/angrysysadmins.tech\\\/index.php\\\/2018\\\/11\\\/bailey\\\/list-escape-characters-sequences\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/angrysysadmins.tech\\\/index.php\\\/2018\\\/11\\\/bailey\\\/list-escape-characters-sequences\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/angrysysadmins.tech\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Bailey&#8217;s Big List of Escape Characters and Sequences\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/angrysysadmins.tech\\\/#website\",\"url\":\"https:\\\/\\\/angrysysadmins.tech\\\/\",\"name\":\"Angry Sysadmins\",\"description\":\"A site full of angry sysadmins here to vent and help\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/angrysysadmins.tech\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/angrysysadmins.tech\\\/#\\\/schema\\\/person\\\/151b2d23439b55b970060836f317a14d\",\"name\":\"Cat Kasin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e83bfa1b7d9ce082bd6b68938f580039db8d5571ad6c5d012e6a5243a189309e?s=96&d=mm&r=g23b0ffb86dd6c08514a66a6a50f7a0a9\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e83bfa1b7d9ce082bd6b68938f580039db8d5571ad6c5d012e6a5243a189309e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e83bfa1b7d9ce082bd6b68938f580039db8d5571ad6c5d012e6a5243a189309e?s=96&d=mm&r=g\",\"caption\":\"Cat Kasin\"},\"description\":\"I build virtual environments and challenges for Cybersecurity students to complete as a way to gain experience before graduating and entering the workforce.\",\"url\":\"https:\\\/\\\/angrysysadmins.tech\\\/index.php\\\/author\\\/bailey\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Bailey's Big List of Escape Characters and Sequences - Angry Sysadmins","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:\/\/angrysysadmins.tech\/index.php\/2018\/11\/bailey\/list-escape-characters-sequences\/","og_locale":"en_US","og_type":"article","og_title":"Bailey's Big List of Escape Characters and Sequences - Angry Sysadmins","og_description":"Escaping special characters is generally pretty straight forward, just throw the correct character in front of the problem, and it should solve itself. Sometimes it gets a bit weird though, and also sometimes it is difficult to find the correct way of doing something. I plan for this to be a live document that I Read More &raquo;","og_url":"https:\/\/angrysysadmins.tech\/index.php\/2018\/11\/bailey\/list-escape-characters-sequences\/","og_site_name":"Angry Sysadmins","article_published_time":"2018-11-01T22:45:01+00:00","article_modified_time":"2019-03-16T03:36:35+00:00","author":"Cat Kasin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Cat Kasin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/angrysysadmins.tech\/index.php\/2018\/11\/bailey\/list-escape-characters-sequences\/#article","isPartOf":{"@id":"https:\/\/angrysysadmins.tech\/index.php\/2018\/11\/bailey\/list-escape-characters-sequences\/"},"author":{"name":"Cat Kasin","@id":"https:\/\/angrysysadmins.tech\/#\/schema\/person\/151b2d23439b55b970060836f317a14d"},"headline":"Bailey&#8217;s Big List of Escape Characters and Sequences","datePublished":"2018-11-01T22:45:01+00:00","dateModified":"2019-03-16T03:36:35+00:00","mainEntityOfPage":{"@id":"https:\/\/angrysysadmins.tech\/index.php\/2018\/11\/bailey\/list-escape-characters-sequences\/"},"wordCount":198,"commentCount":1,"keywords":["batch","escape","nagios","programming"],"articleSection":["Bash","Batch","Powershell","Programming","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/angrysysadmins.tech\/index.php\/2018\/11\/bailey\/list-escape-characters-sequences\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/angrysysadmins.tech\/index.php\/2018\/11\/bailey\/list-escape-characters-sequences\/","url":"https:\/\/angrysysadmins.tech\/index.php\/2018\/11\/bailey\/list-escape-characters-sequences\/","name":"Bailey's Big List of Escape Characters and Sequences - Angry Sysadmins","isPartOf":{"@id":"https:\/\/angrysysadmins.tech\/#website"},"datePublished":"2018-11-01T22:45:01+00:00","dateModified":"2019-03-16T03:36:35+00:00","author":{"@id":"https:\/\/angrysysadmins.tech\/#\/schema\/person\/151b2d23439b55b970060836f317a14d"},"breadcrumb":{"@id":"https:\/\/angrysysadmins.tech\/index.php\/2018\/11\/bailey\/list-escape-characters-sequences\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/angrysysadmins.tech\/index.php\/2018\/11\/bailey\/list-escape-characters-sequences\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/angrysysadmins.tech\/index.php\/2018\/11\/bailey\/list-escape-characters-sequences\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/angrysysadmins.tech\/"},{"@type":"ListItem","position":2,"name":"Bailey&#8217;s Big List of Escape Characters and Sequences"}]},{"@type":"WebSite","@id":"https:\/\/angrysysadmins.tech\/#website","url":"https:\/\/angrysysadmins.tech\/","name":"Angry Sysadmins","description":"A site full of angry sysadmins here to vent and help","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/angrysysadmins.tech\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/angrysysadmins.tech\/#\/schema\/person\/151b2d23439b55b970060836f317a14d","name":"Cat Kasin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e83bfa1b7d9ce082bd6b68938f580039db8d5571ad6c5d012e6a5243a189309e?s=96&d=mm&r=g23b0ffb86dd6c08514a66a6a50f7a0a9","url":"https:\/\/secure.gravatar.com\/avatar\/e83bfa1b7d9ce082bd6b68938f580039db8d5571ad6c5d012e6a5243a189309e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e83bfa1b7d9ce082bd6b68938f580039db8d5571ad6c5d012e6a5243a189309e?s=96&d=mm&r=g","caption":"Cat Kasin"},"description":"I build virtual environments and challenges for Cybersecurity students to complete as a way to gain experience before graduating and entering the workforce.","url":"https:\/\/angrysysadmins.tech\/index.php\/author\/bailey\/"}]}},"_links":{"self":[{"href":"https:\/\/angrysysadmins.tech\/index.php\/wp-json\/wp\/v2\/posts\/60","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/angrysysadmins.tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/angrysysadmins.tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/angrysysadmins.tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/angrysysadmins.tech\/index.php\/wp-json\/wp\/v2\/comments?post=60"}],"version-history":[{"count":11,"href":"https:\/\/angrysysadmins.tech\/index.php\/wp-json\/wp\/v2\/posts\/60\/revisions"}],"predecessor-version":[{"id":469,"href":"https:\/\/angrysysadmins.tech\/index.php\/wp-json\/wp\/v2\/posts\/60\/revisions\/469"}],"wp:attachment":[{"href":"https:\/\/angrysysadmins.tech\/index.php\/wp-json\/wp\/v2\/media?parent=60"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/angrysysadmins.tech\/index.php\/wp-json\/wp\/v2\/categories?post=60"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/angrysysadmins.tech\/index.php\/wp-json\/wp\/v2\/tags?post=60"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/angrysysadmins.tech\/index.php\/wp-json\/wp\/v2\/coauthors?post=60"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}