<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://library.morph.zone/index.php?action=history&amp;feed=atom&amp;title=Shell_Commands%2FReplace</id>
		<title>Shell Commands/Replace - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://library.morph.zone/index.php?action=history&amp;feed=atom&amp;title=Shell_Commands%2FReplace"/>
		<link rel="alternate" type="text/html" href="https://library.morph.zone/index.php?title=Shell_Commands/Replace&amp;action=history"/>
		<updated>2026-07-01T10:58:59Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://library.morph.zone/index.php?title=Shell_Commands/Replace&amp;diff=4428&amp;oldid=prev</id>
		<title>JPV: Created page with &quot;'''Replace''' - Modifies text and binary files by replacing data  FILE/A,PATTERN/K,FIND/K/A,REPLACE/K/A,TO/K,ALL/S,I=INSENSITIVE/S,VERBOSE/S,SIM=SIMULATE/S  &lt;nowiki&gt; FILE...&quot;</title>
		<link rel="alternate" type="text/html" href="https://library.morph.zone/index.php?title=Shell_Commands/Replace&amp;diff=4428&amp;oldid=prev"/>
				<updated>2026-06-29T12:15:00Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Replace&amp;#039;&amp;#039;&amp;#039; - Modifies text and binary files by replacing data  FILE/A,PATTERN/K,FIND/K/A,REPLACE/K/A,TO/K,ALL/S,I=INSENSITIVE/S,VERBOSE/S,SIM=SIMULATE/S  &amp;lt;nowiki&amp;gt; FILE...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Replace''' - Modifies text and binary files by replacing data&lt;br /&gt;
&lt;br /&gt;
FILE/A,PATTERN/K,FIND/K/A,REPLACE/K/A,TO/K,ALL/S,I=INSENSITIVE/S,VERBOSE/S,SIM=SIMULATE/S&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
FILE        - Directory or file pattern&lt;br /&gt;
PATTERN     - Pattern to be applied on files found with the FILE argument&lt;br /&gt;
FIND        - Text or binary data to be searched for, \xHH for hex data&lt;br /&gt;
REPLACE     - Text or binary data to replace every found data with, \xHH for hex data&lt;br /&gt;
TO          - Path to a directory to store the modified files into, TO cannot be&lt;br /&gt;
              the directory containing the source file&lt;br /&gt;
ALL         - Search for matching files recursively and modify original files,&lt;br /&gt;
              TO and ALL are mutually exclusive arguments&lt;br /&gt;
INSENSITIVE - All characters in found file data and PATTERN and will be lower&lt;br /&gt;
              cased before a compare operation, this also affects characters in&lt;br /&gt;
              hex data specified via &amp;quot;0x&amp;quot; in the PATTERN option&lt;br /&gt;
VERBOSE     - Shows all found files and how many patterns were modifed&lt;br /&gt;
SIMULATE    - The entire operation will only be simulated and no files get modified&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
Scans all #?.readme files in T: and changes dogs to cats in the text:&lt;br /&gt;
 Replace T:#?.readme FIND &amp;quot;Dog&amp;quot; REPLACE &amp;quot;Cat&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Scans the entire RAM: drive and replaces dogs to cats in all files ending with &amp;quot;.txt&amp;quot; and outputting detailed information of found files and the matches. Simulation is enabled, so no modification takes place:&lt;br /&gt;
 Replace &amp;quot;RAM:#?&amp;quot; PATTERN &amp;quot;#?.txt&amp;quot; FIND &amp;quot;Dog&amp;quot; REPLACE &amp;quot;Cat&amp;quot; ALL VERBOSE SIM&lt;br /&gt;
&lt;br /&gt;
Convert an IBM text to a modern one by replacing CR+LF (0x0D0A) with just LF (0x0A). Operation is performed in the byte mode, so FIND is two bytes and gets replaced by just one byte:&lt;br /&gt;
 Replace &amp;quot;RAM:Windows.txt&amp;quot; FIND &amp;quot;\x0d\x0a&amp;quot; REPLACE &amp;quot;\x0a&amp;quot;&lt;/div&gt;</summary>
		<author><name>JPV</name></author>	</entry>

	</feed>