snipt

Ctrl+h for KB shortcuts

Bash

Substitution with sed from one file to another

sed -e 's/expression1/expression2/' source_file > target_file
https://snipt.net/embed/298b55f3e669cf33b8e8df407b4af9dd/
/raw/298b55f3e669cf33b8e8df407b4af9dd/
298b55f3e669cf33b8e8df407b4af9dd
bash
Bash
1
2019-08-17T14:47:17
True
False
False
/api/public/snipt/6510/
substitution-with-sed-from-one-file-to-another
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>sed -e <span class="s1">&#39;s/expression1/expression2/&#39;</span> source_file &gt; target_file </span></pre></div> </td></tr></table>
file, sed, substitution, text