<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Linux: how to remove trailing ^M (carriage return)</title> <atom:link href="https://bogdan.org.ua/2009/03/30/linux-how-to-remove-trailing-control-m-carriage-return.html/feed" rel="self" type="application/rss+xml" /><link>https://bogdan.org.ua/2009/03/30/linux-how-to-remove-trailing-control-m-carriage-return.html</link> <description>Tiny bits of bioinformatics, [web-]programming etc</description> <lastBuildDate>Mon, 01 Jan 2024 17:12:20 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>https://wordpress.org/?v=3.8.27</generator> <item><title>By: Bogdan</title><link>https://bogdan.org.ua/2009/03/30/linux-how-to-remove-trailing-control-m-carriage-return.html#comment-167846</link> <dc:creator><![CDATA[Bogdan]]></dc:creator> <pubDate>Mon, 08 Jul 2013 08:46:52 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=640#comment-167846</guid> <description><![CDATA[@J - thanks, that is indeed so - I had no spaces in names, thus no quoting.
Do not forget to redirect the output of tr (this part seems missing from your comment): &quot;tr -d \r &lt; ${f}~ &gt;$f&quot;]]></description> <content:encoded><![CDATA[<p>@J &#8211; thanks, that is indeed so &#8211; I had no spaces in names, thus no quoting.</p><p>Do not forget to redirect the output of tr (this part seems missing from your comment): &#8220;tr -d \r < ${f}~ >$f&#8221;</p> ]]></content:encoded> </item> <item><title>By: J</title><link>https://bogdan.org.ua/2009/03/30/linux-how-to-remove-trailing-control-m-carriage-return.html#comment-167685</link> <dc:creator><![CDATA[J]]></dc:creator> <pubDate>Mon, 08 Jul 2013 00:36:23 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=640#comment-167685</guid> <description><![CDATA[Incase file names/directories contain any spaces, lets add quotes to the multiple files script:
for f
do
mv &quot;$f&quot; &quot;${f}~&quot; &amp;&amp; tr -d &quot;\r&quot; &quot;$f&quot;
rm &quot;${f}~&quot;
done
This script will now work great with find and the -exec parameter.]]></description> <content:encoded><![CDATA[<p>Incase file names/directories contain any spaces, lets add quotes to the multiple files script:</p><p>for f<br
/> do<br
/> mv &#8220;$f&#8221; &#8220;${f}~&#8221; &amp;&amp; tr -d &#8220;\r&#8221; &#8220;$f&#8221;<br
/> rm &#8220;${f}~&#8221;<br
/> done</p><p>This script will now work great with find and the -exec parameter.</p> ]]></content:encoded> </item> <item><title>By: Best method to recursively chmod/process files or directories &#187;Autarchy of the Private Cave</title><link>https://bogdan.org.ua/2009/03/30/linux-how-to-remove-trailing-control-m-carriage-return.html#comment-101528</link> <dc:creator><![CDATA[Best method to recursively chmod/process files or directories &#187;Autarchy of the Private Cave]]></dc:creator> <pubDate>Mon, 08 Jun 2009 14:34:04 +0000</pubDate> <guid
isPermaLink="false">http://bogdan.org.ua/?p=640#comment-101528</guid> <description><![CDATA[[...] newlines from the end of all *.php files: find . -type f -name &#8220;*.php&#8221; -exec /home/user/dos2unix.sh {} [...]]]></description> <content:encoded><![CDATA[<p>[...] newlines from the end of all *.php files: find . -type f -name &#8220;*.php&#8221; -exec /home/user/dos2unix.sh {} [...]</p> ]]></content:encoded> </item> </channel> </rss>