<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>perl &#8211; Rafael Bernard Araujo</title>
	<atom:link href="https://rafael.bernard-araujo.com/tag/perl/feed" rel="self" type="application/rss+xml" />
	<link>https://rafael.bernard-araujo.com</link>
	<description>desenvolvendo... while(!success){  try(); }</description>
	<lastBuildDate>Wed, 03 Nov 2021 23:59:25 +0000</lastBuildDate>
	<language>pt-BR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">21941730</site>	<item>
		<title>Substituindo o mesmo texto em arquivos diferentes</title>
		<link>https://rafael.bernard-araujo.com/substituindo-o-mesmo-texto-em-arquivos-diferentes.php</link>
					<comments>https://rafael.bernard-araujo.com/substituindo-o-mesmo-texto-em-arquivos-diferentes.php#comments</comments>
		
		<dc:creator><![CDATA[rafael]]></dc:creator>
		<pubDate>Mon, 18 Feb 2013 12:13:58 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[shell script]]></category>
		<guid isPermaLink="false">http://rafael.bernard-araujo.com/?p=1033</guid>

					<description><![CDATA[Dificuldade: Intermediário Aplicação: find / Perl Se você tem um texto que deseja substituir em vários locais, há várias maneiras de fazer isso. Para substituir o texto Windows por Linux em todos os arquivos no diretório atual chamado teste[alguma coisa] você pode executar o seguinte: perl -i -pe 's/Windows/Linux/;' test* Para substituir o texto Windows [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Dificuldade: Intermediário<br />
Aplicação: find / Perl</p>
<p>Se você tem um texto que deseja substituir em vários locais, há várias maneiras de fazer isso. Para substituir o texto Windows por Linux em todos os arquivos no diretório atual chamado teste[alguma coisa] você pode executar o seguinte:</p>
<pre class="bash" style="font-size:px;color: #;"><span style="color: #c20cb9; font-weight: bold;color: #">perl</span> <span style="color: #660033;">-i</span> <span style="color: #660033;">-pe</span> <span style="color: #ff0000;">'s/Windows/Linux/;'</span> <span style="color: #7a0874; font-weight: bold;color: #">test</span><span style="color: #000000; font-weight: bold;color: #">*</span></pre>
<p>Para substituir o texto Windows por Linux em todos os arquivos de texto no diretório atual e para baixo você pode executar este:</p>
<pre class="bash" style="font-size:px;color: #;"><span style="color: #c20cb9; font-weight: bold;color: #">find</span> . <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'*.txt'</span> <span style="color: #660033;">-print</span> <span style="color: #000000; font-weight: bold;color: #">|</span> <span style="color: #c20cb9; font-weight: bold;color: #">xargs</span> <span style="color: #c20cb9; font-weight: bold;color: #">perl</span> <span style="color: #660033;">-pi</span> <span style="color: #660033;">-e</span><span style="color: #ff0000;">'s/Windows/Linux/ig'</span> <span style="color: #000000; font-weight: bold;color: #">*</span>.txt</pre>
<p>Ou se você preferir isso também vai funcionar, mas apenas em arquivos regulares:</p>
<pre class="bash" style="font-size:px;color: #;"><span style="color: #c20cb9; font-weight: bold;color: #">find</span> <span style="color: #660033;">-type</span> f <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'*.txt'</span> <span style="color: #660033;">-print0</span> <span style="color: #000000; font-weight: bold;color: #">|</span> <span style="color: #c20cb9; font-weight: bold;color: #">xargs</span> <span style="color: #660033;">--null</span> <span style="color: #c20cb9; font-weight: bold;color: #">perl</span> <span style="color: #660033;">-pi</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/Windows/Linux/'</span></pre>
<p>Economiza muito tempo e tem uma classificação de guru alta!</p>
<p>De <a title="Dicas de Linux que todo geek deve saber" href="http://rafael.bernard-araujo.com/dicas-de-linux-que-todo-geek-deve-saber.php">Dicas de Linux que todo geek deve saber</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://rafael.bernard-araujo.com/substituindo-o-mesmo-texto-em-arquivos-diferentes.php/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1033</post-id>	</item>
		<item>
		<title>Dicas de Linux que todo geek deve saber</title>
		<link>https://rafael.bernard-araujo.com/dicas-de-linux-que-todo-geek-deve-saber.php</link>
					<comments>https://rafael.bernard-araujo.com/dicas-de-linux-que-todo-geek-deve-saber.php#comments</comments>
		
		<dc:creator><![CDATA[rafael]]></dc:creator>
		<pubDate>Sat, 28 Jul 2012 02:53:02 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[shell script]]></category>
		<guid isPermaLink="false">http://rafael.bernard-araujo.com/?p=1010</guid>

					<description><![CDATA[Fonte: Linux tips every geek should know O que separa os usuários normais dos super-geeks? Simples: anos gastos aprendendo maneiras de desmantelar códigos, truques, dicas e técnicas que transformam grandes esforço num trabalho de um momento. Se você quer ganhar agilidade para colocar as mãos á obra, separamos 50 dicas fáceis de aprender para lhe [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Fonte: <a title=" Linux tips every geek should know" href="https://web.archive.org/web/20180322200847/http://www.tuxradar.com:80/content/linux-tips-every-geek-should-know">Linux tips every geek should know</a></p>
<p>O que separa os usuários normais dos super-geeks? Simples: anos gastos aprendendo maneiras de desmantelar códigos, truques, dicas e técnicas que transformam grandes esforço num trabalho de um momento. Se você quer ganhar agilidade para colocar as mãos á obra, separamos 50 dicas fáceis de aprender para lhe ajudar a trabalhar com mais eficiência e obter o máximo do seu computador. Aproveite!</p>
<ol>
<li><a title="Verifique os processos que estão rodando e que não são os seus" href="http://rafael.bernard-araujo.com/verifique-os-processos-que-estao-rodando-e-que-nao-sao-os-seus.php">Verifique os processos que estão rodando e que não são os seus</a></li>
<li><a title="Substituindo o mesmo texto em arquivos diferentes" href="http://rafael.bernard-araujo.com/substituindo-o-mesmo-texto-em-arquivos-diferentes.php">Substituindo o mesmo texto em arquivos diferentes</a></li>
<li><a title="Consertar um terminal problemático" href="http://rafael.bernard-araujo.com/consertar-um-terminal-problematico.php">Consertar um terminal problemático</a></li>
</ol>
]]></content:encoded>
					
					<wfw:commentRss>https://rafael.bernard-araujo.com/dicas-de-linux-que-todo-geek-deve-saber.php/feed</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1010</post-id>	</item>
	</channel>
</rss>
