{"id":8438,"date":"2015-03-20T03:19:52","date_gmt":"2015-03-20T03:19:52","guid":{"rendered":"https:\/\/wp.okra.host\/article\/changing-eol-markers\/"},"modified":"2021-03-07T14:11:04","modified_gmt":"2021-03-07T13:11:04","slug":"changing-eol-markers","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/changing-eol-markers\/","title":{"rendered":"Changing EOL markers"},"content":{"rendered":"<h2 id=\"overview\" >\u00dcbersicht<\/h2>\n<p>End-of-line (&#8220;EOL&#8221;) markers indicate a\u00a0discontinuation of a current line and beginning of a new line. EOL markers are akin to the return (&#8220;\u23ce&#8221;) key on a typewriter and, depending upon operating system, are interpreted as a single or combination of characters.<\/p>\n<h3 id=\"on-windows\" >On Windows<\/h3>\n<p>On Windows operating systems, an EOL is marked by two characters: carriage return (&#8220;r&#8221;)\u00a0<em>und<\/em> newline (&#8220;n&#8221;).<\/p>\n<h3 id=\"on-linux\" >On Linux<\/h3>\n<p>On Linux and Unix operating systems, an EOL is marked by\u00a0one character: a newline (&#8220;n&#8221;)<\/p>\n<h3 id=\"on-mac\" >On Mac<\/h3>\n<p>On Mac operating systems, an EOL is marked by one character: a carriage return (&#8220;r&#8221;)<\/p>\n<h3 id=\"importance\" >Importance<\/h3>\n<p>EOLs are an idiosyncrasy of each operating system. Most cross-platform languages, like PHP, Python, and Ruby will recognize rn, r, and n as newline markers. Shell scripts, in particular, the first line (called a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Shebang_%28Unix%29\">shebang<\/a>) are picky as well as <a title=\".htaccess-Leitfaden\" href=\"https:\/\/kb.okra.host\/de\/guides\/htaccess-guide\/\">htaccess<\/a> directives as to what EOL is used. For all purposes, always use Linux-style EOL markers (n) for EOL. Shell scripts fail to function if any EOL besides n are used. htaccess directives fail to work if Mac EOL markers (r) are used. <a title=\"Mail filtering\" href=\"https:\/\/kb.okra.host\/de\/guides\/mail-filtering\/\">Maildrop<\/a> recipes fail to work if any EOL besides n are used up to <a title=\"Ermitteln der Plattformversion\" href=\"https:\/\/kb.okra.host\/de\/platform\/determining-platform-version\/\">v6 platforms<\/a>, at which point only Mac EOL markers (r) are rejected.<\/p>\n<p>EOLs are the computing equivalent to <a href=\"http:\/\/en.wikipedia.org\/wiki\/The_Butter_Battle_Book\"><span style=\"text-decoration: underline\">The Butter Battle Book<\/span><\/a>. There is no prevailing benefit apart from idiosyncrasies baked into the operating system the moment\u00a0it was conceived. Butter-side up or butter-side down, it conveys the same meaning.<\/p>\n<h2 id=\"converting-eols\" >Converting EOLs<\/h2>\n<p>Since different applications mandate different EOLs conversions are unavoidable. An EOL may be easily converted within the <a title=\"Anmeldung am Bedienfeld\" href=\"https:\/\/kb.okra.host\/de\/control-panel\/logging-into-the-control-panel\/\">Bedienfeld<\/a> via <strong>Dateien<\/strong> &gt; <strong>Datei-Manager<\/strong>.<\/p>\n<ol>\n<li>Browse to the directory that contains the file<\/li>\n<li>Hover to the row that contains the file<\/li>\n<li>Select\u00a0<strong>Eigenschaften<\/strong>\u00a0under the\u00a0<em>Actions<\/em>\u00a0column\n<ul>\n<li>This will bring up the file properties dialog to change permissions and EOL\u00a0conversion filters\n<\/p>\n<div id=\"attachment_916\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/03\/file-permission-screen.png\" rel=\"lightbox-0\"><img decoding=\"async\" aria-describedby=\"caption-attachment-916\" loading=\"lazy\" class=\"size-medium wp-image-916\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/03\/file-permission-screen-300x147.png\" alt=\"File properties dialog\" width=\"300\" height=\"147\" \/><\/a><\/p>\n<p id=\"caption-attachment-916\" class=\"wp-caption-text\">File properties dialog<\/p>\n<\/div>\n<\/li>\n<\/ul>\n<\/li>\n<li>Depending upon the system on which the file was created, click\u00a0<strong>Windows<\/strong> &gt;\u00a0<strong>Unix<\/strong> oder\u00a0<strong>Mac<\/strong> &gt;\u00a0<strong>Unix<\/strong><\/li>\n<\/ol>\n<p>This will convert EOL markers from rn -&gt; n or r -&gt; n respectively and make it compatible\u00a0with our hosting platform based off Linux, which itself is a Unix derivative&#8230;<\/p>\n<h3 id=\"implicit-eols\" >Implicit EOLs<\/h3>\n<p>Any shell script that begins with a shebang (<code>#!<\/code>) will automatically have its EOL forced to Unix-style (n).<\/p>\n<h3 id=\"saving-a-file-edit-with-eol\" >Saving a file edit with EOL<\/h3>\n<p>Files edited within the File Manager may also have a EOL forced upon successful edit. Expand the EOL dropdown above the file contents, then choose the\u00a0appropriate EOL marker.<\/p>\n<div id=\"attachment_1262\" style=\"width: 281px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/03\/apnscp-eol.png\" rel=\"attachment wp-att-1262 lightbox-1\" data-lbwps-width=\"271\" data-lbwps-height=\"252\" data-lbwps-srcsmall=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/03\/apnscp-eol.png\"><img decoding=\"async\" aria-describedby=\"caption-attachment-1262\" loading=\"lazy\" class=\"size-full wp-image-1262\" src=\"https:\/\/kb.okra.host\/wp-content\/uploads\/2015\/03\/apnscp-eol.png\" alt=\"EOL selector in Files &gt; File Manager &gt; Edit File\" width=\"271\" height=\"252\" \/><\/a><\/p>\n<p id=\"caption-attachment-1262\" class=\"wp-caption-text\">EOL selector in Files &gt; File Manager &gt; Edit File<\/p>\n<\/div>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Overview End-of-line (&#8220;EOL&#8221;) markers indicate a\u00a0discontinuation of a current line and beginning of a new line. EOL markers are akin to the return (&#8220;\u23ce&#8221;) key on a typewriter and, depending upon operating system, are interpreted as a single or combination of characters. On Windows On Windows operating systems, an EOL&#8230;<\/p>","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[56],"ht-kb-tag":[],"class_list":["post-8438","ht_kb","type-ht_kb","status-publish","format-standard","has-post-thumbnail","hentry","ht_kb_category-control-panel"],"_links":{"self":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/comments?post=8438"}],"version-history":[{"count":2,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8438\/revisions"}],"predecessor-version":[{"id":8442,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8438\/revisions\/8442"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media\/8440"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8438"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8438"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}