<?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: Bash Script for Replace Multiple Words in a Multiple File	</title>
	<atom:link href="https://www.vavai.net/bash-script-for-replace-multiple-words-in-a-multiple-file/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.vavai.net/bash-script-for-replace-multiple-words-in-a-multiple-file/</link>
	<description>Life is our precious gift</description>
	<lastBuildDate>Fri, 15 Jan 2010 04:38:26 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Masim "Vavai" Sugianto		</title>
		<link>https://www.vavai.net/bash-script-for-replace-multiple-words-in-a-multiple-file/#comment-889</link>

		<dc:creator><![CDATA[Masim "Vavai" Sugianto]]></dc:creator>
		<pubDate>Fri, 15 Jan 2010 04:38:26 +0000</pubDate>
		<guid isPermaLink="false">http://v2.vavai.net/?p=977#comment-889</guid>

					<description><![CDATA[@Pascal,
Thank you. I&#039;m not really familiar with Perl but I would love to try your code. :-)]]></description>
			<content:encoded><![CDATA[<p>@Pascal,<br />
Thank you. I&#8217;m not really familiar with Perl but I would love to try your code. 🙂</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Pascal Bleser		</title>
		<link>https://www.vavai.net/bash-script-for-replace-multiple-words-in-a-multiple-file/#comment-887</link>

		<dc:creator><![CDATA[Pascal Bleser]]></dc:creator>
		<pubDate>Thu, 07 Jan 2010 15:56:19 +0000</pubDate>
		<guid isPermaLink="false">http://v2.vavai.net/?p=977#comment-887</guid>

					<description><![CDATA[As Diego already said, it is a lot easier to use the &quot;-i&quot; in-place editing flag, because it does it properly (locking, really temporary/random filename, ...). If not, it is a lot safer to use &quot;mktemp&quot; instead of a fixed filename.
But be aware that those &quot;words&quot; are actually regular expressions, and that you cannot use e.g. &quot;/&quot; in the word to be replaced or the replacement.
I would rather resort to Perl, because it has the ability to escape complete strings in regular expressions. Oh, and Perl also has the -i flag :)
perl -pi -e &#039;s/Qword1E/Qreplacement1E/g;s/Qword2E/Qreplacement2E/g&#039; file1 file2 file3]]></description>
			<content:encoded><![CDATA[<p>As Diego already said, it is a lot easier to use the &#8220;-i&#8221; in-place editing flag, because it does it properly (locking, really temporary/random filename, &#8230;). If not, it is a lot safer to use &#8220;mktemp&#8221; instead of a fixed filename.<br />
But be aware that those &#8220;words&#8221; are actually regular expressions, and that you cannot use e.g. &#8220;/&#8221; in the word to be replaced or the replacement.<br />
I would rather resort to Perl, because it has the ability to escape complete strings in regular expressions. Oh, and Perl also has the -i flag 🙂<br />
perl -pi -e &#8216;s/Qword1E/Qreplacement1E/g;s/Qword2E/Qreplacement2E/g&#8217; file1 file2 file3</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Pascal Bleser		</title>
		<link>https://www.vavai.net/bash-script-for-replace-multiple-words-in-a-multiple-file/#comment-888</link>

		<dc:creator><![CDATA[Pascal Bleser]]></dc:creator>
		<pubDate>Thu, 07 Jan 2010 15:56:19 +0000</pubDate>
		<guid isPermaLink="false">http://v2.vavai.net/?p=977#comment-888</guid>

					<description><![CDATA[As Diego already said, it is a lot easier to use the &quot;-i&quot; in-place editing flag, because it does it properly (locking, really temporary/random filename, ...). If not, it is a lot safer to use &quot;mktemp&quot; instead of a fixed filename.
But be aware that those &quot;words&quot; are actually regular expressions, and that you cannot use e.g. &quot;/&quot; in the word to be replaced or the replacement.
I would rather resort to Perl, because it has the ability to escape complete strings in regular expressions. Oh, and Perl also has the -i flag :)
perl -pi -e &#039;s/Qword1E/Qreplacement1E/g;s/Qword2E/Qreplacement2E/g&#039; file1 file2 file3]]></description>
			<content:encoded><![CDATA[<p>As Diego already said, it is a lot easier to use the &#8220;-i&#8221; in-place editing flag, because it does it properly (locking, really temporary/random filename, &#8230;). If not, it is a lot safer to use &#8220;mktemp&#8221; instead of a fixed filename.<br />
But be aware that those &#8220;words&#8221; are actually regular expressions, and that you cannot use e.g. &#8220;/&#8221; in the word to be replaced or the replacement.<br />
I would rather resort to Perl, because it has the ability to escape complete strings in regular expressions. Oh, and Perl also has the -i flag 🙂<br />
perl -pi -e &#8216;s/Qword1E/Qreplacement1E/g;s/Qword2E/Qreplacement2E/g&#8217; file1 file2 file3</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Vavai		</title>
		<link>https://www.vavai.net/bash-script-for-replace-multiple-words-in-a-multiple-file/#comment-885</link>

		<dc:creator><![CDATA[Vavai]]></dc:creator>
		<pubDate>Thu, 07 Jan 2010 12:04:19 +0000</pubDate>
		<guid isPermaLink="false">http://v2.vavai.net/?p=977#comment-885</guid>

					<description><![CDATA[Hi Diego,
Thanks for the suggestion.]]></description>
			<content:encoded><![CDATA[<p>Hi Diego,<br />
Thanks for the suggestion.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Vavai		</title>
		<link>https://www.vavai.net/bash-script-for-replace-multiple-words-in-a-multiple-file/#comment-886</link>

		<dc:creator><![CDATA[Vavai]]></dc:creator>
		<pubDate>Thu, 07 Jan 2010 12:04:19 +0000</pubDate>
		<guid isPermaLink="false">http://v2.vavai.net/?p=977#comment-886</guid>

					<description><![CDATA[Hi Diego,
Thanks for the suggestion.]]></description>
			<content:encoded><![CDATA[<p>Hi Diego,<br />
Thanks for the suggestion.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Diego E. "Flameeyes" PettenÃ²		</title>
		<link>https://www.vavai.net/bash-script-for-replace-multiple-words-in-a-multiple-file/#comment-883</link>

		<dc:creator><![CDATA[Diego E. "Flameeyes" PettenÃ²]]></dc:creator>
		<pubDate>Thu, 07 Jan 2010 10:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://v2.vavai.net/?p=977#comment-883</guid>

					<description><![CDATA[On modern GNU sed (that is, from at least the last five years) â€“ and you&#039;re already assuming GNU sed when you use multiple -e parameters â€“ you can use the -i parameter to do &quot;inline replace&quot;.
This way you don&#039;t have to copy the file to a temporary version and then back again for the replacement, nor you really need to grep for the string: just use sed -i -e &#039;...&#039; -e &#039;...&#039; /list/of/files/*.foo]]></description>
			<content:encoded><![CDATA[<p>On modern GNU sed (that is, from at least the last five years) â€“ and you&#8217;re already assuming GNU sed when you use multiple -e parameters â€“ you can use the -i parameter to do &#8220;inline replace&#8221;.<br />
This way you don&#8217;t have to copy the file to a temporary version and then back again for the replacement, nor you really need to grep for the string: just use sed -i -e &#8216;&#8230;&#8217; -e &#8216;&#8230;&#8217; /list/of/files/*.foo</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Diego E. "Flameeyes" PettenÃ²		</title>
		<link>https://www.vavai.net/bash-script-for-replace-multiple-words-in-a-multiple-file/#comment-884</link>

		<dc:creator><![CDATA[Diego E. "Flameeyes" PettenÃ²]]></dc:creator>
		<pubDate>Thu, 07 Jan 2010 10:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://v2.vavai.net/?p=977#comment-884</guid>

					<description><![CDATA[On modern GNU sed (that is, from at least the last five years) â€“ and you&#039;re already assuming GNU sed when you use multiple -e parameters â€“ you can use the -i parameter to do &quot;inline replace&quot;.
This way you don&#039;t have to copy the file to a temporary version and then back again for the replacement, nor you really need to grep for the string: just use sed -i -e &#039;...&#039; -e &#039;...&#039; /list/of/files/*.foo]]></description>
			<content:encoded><![CDATA[<p>On modern GNU sed (that is, from at least the last five years) â€“ and you&#8217;re already assuming GNU sed when you use multiple -e parameters â€“ you can use the -i parameter to do &#8220;inline replace&#8221;.<br />
This way you don&#8217;t have to copy the file to a temporary version and then back again for the replacement, nor you really need to grep for the string: just use sed -i -e &#8216;&#8230;&#8217; -e &#8216;&#8230;&#8217; /list/of/files/*.foo</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Object Caching 30/51 objects using Disk
Page Caching using Disk: Enhanced 
Content Delivery Network via Amazon Web Services: CloudFront: d3b35uem336dgh.cloudfront.net
Lazy Loading (feed)
Minified using Disk
Database Caching 12/26 queries in 0.009 seconds using Disk

Served from: www.vavai.net @ 2026-10-28 21:47:26 by W3 Total Cache
-->