<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Text File on Michael’s Domain</title><link>https://jeltsch.org/en/tags/text-file/</link><description>Recent content in Text File on Michael’s Domain</description><generator>Hugo</generator><language>en-us</language><copyright>Copyright © 2002 - 2026 Michael Jeltsch.</copyright><lastBuildDate>Fri, 24 Jul 2026 00:18:18 +0300</lastBuildDate><atom:link href="https://jeltsch.org/en/tags/text-file/index.xml" rel="self" type="application/rss+xml"/><item><title>Converting Mac text files into UNIX text files (tr)</title><link>https://jeltsch.org/en/converting_mac_text_files_into_unix_text_files_tr/</link><pubDate>Wed, 04 Apr 2007 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/converting_mac_text_files_into_unix_text_files_tr/</guid><description>&lt;p&gt;If you though text files are all the same, you are wrong. Mac text file lines end with a carriage return (CR, ASCII 13), UNIX text file lines with a line feed (LF, ACII 10) and Microsoft Windows text file lines end with a combination of 2 characters: CR followed by LF. From Mac to Unix you convert with this command line: &lt;code&gt;tr '\015' '\012' out_file&lt;/code&gt;&lt;/p&gt;</description></item><item><title>Deleting empty lines from text files (sed)</title><link>https://jeltsch.org/en/deleting_empty_lines_from_text_files_sed/</link><pubDate>Tue, 09 Aug 2005 00:00:00 +0000</pubDate><guid>https://jeltsch.org/en/deleting_empty_lines_from_text_files_sed/</guid><description>&lt;p&gt;The following sed command deletes empty lines (and those with white spaces only) from text files:&lt;/p&gt;
&lt;div class="codeblock syntax-highlight mb-3"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sed -e &amp;#39;/^ *$/d&amp;#39; infile.txt &amp;gt; outfile.txt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;You have to be careful though: if you copied the textfile from a Macintosh this script maybe won&amp;rsquo;t work. You first have to convert the Macintosh textfile into a UNIX textfile!&lt;/p&gt;</description></item></channel></rss>