snipt

Ctrl+h for KB shortcuts

Bash

Create a patch

cd /Applications/MAMP/htdocs/drupal/sites/all/modules/uc_discounts/
diff -up original.php new.php > filename.patch
https://snipt.net/embed/01b42cf1772da29851130c66c3aaa0c8/
/raw/01b42cf1772da29851130c66c3aaa0c8/
01b42cf1772da29851130c66c3aaa0c8
bash
Bash
2
2019-05-14T20:26:15
True
False
False
/api/public/snipt/1254/
create-a-patch
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nb">cd</span> /Applications/MAMP/htdocs/drupal/sites/all/modules/uc_discounts/ </span><span id="L-2"><a name="L-2"></a>diff -up original.php new.php &gt; filename.patch </span></pre></div> </td></tr></table>
bash

Bash

apply patch

patch -p0 < patch.txt
https://snipt.net/embed/d7434435766bb9bb67ed07db37d1c78b/
/raw/d7434435766bb9bb67ed07db37d1c78b/
d7434435766bb9bb67ed07db37d1c78b
bash
Bash
1
2019-05-16T18:53:54
True
False
False
/api/public/snipt/458/
apply-patch
<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>patch -p0 &lt; patch.txt </span></pre></div> </td></tr></table>
bash, linux, unix

Bash

show working directory

pwd
https://snipt.net/embed/34cdda62d6e7fcd085da03c184f6fb8c/
/raw/34cdda62d6e7fcd085da03c184f6fb8c/
34cdda62d6e7fcd085da03c184f6fb8c
bash
Bash
1
2019-05-16T04:14:49
True
False
False
/api/public/snipt/254/
show-working-directory
<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><span class="nb">pwd</span> </span></pre></div> </td></tr></table>
bash, linux, unix