snipt

Ctrl+h for KB shortcuts

Text only

DOS :: Copy the last lines of a text file

REM (1) How to copy every line since the line 1984 
more /e +1984 miFicheroInput.txt > miFichDesdeLinea1984.txt
https://snipt.net/embed/e5a1ffda05975d0652032c133cae7f80/
https://snipt.net/raw/e5a1ffda05975d0652032c133cae7f80/
e5a1ffda05975d0652032c133cae7f80
text
Text only
2
2016-09-26T23:15:39
True
False
False
Nov 05, 2013 at 02:30 AM
/api/public/snipt/91770/
dos-copy-the-last-lines-of-a-text-file
<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 id="L-1"><a name="L-1"></a>REM (1) How to copy every line since the line 1984 </span><span id="L-2"><a name="L-2"></a>more /e +1984 miFicheroInput.txt &gt; miFichDesdeLinea1984.txt </span></pre></div> </td></tr></table>
dos

Shell Session

perl convert dos to unix

perl -pi -e 's/\r\n|\n|\r/\r\n/g' file-to-convert  # Convert to DOS
perl -pi -e 's/\r\n|\n|\r/\n/g'   file-to-convert  # Convert to UNIX
https://snipt.net/embed/549871ea3347ad2dd3783eaf8305470e/
https://snipt.net/raw/549871ea3347ad2dd3783eaf8305470e/
549871ea3347ad2dd3783eaf8305470e
shell-session
Shell Session
3
2016-09-26T18:46:17
True
False
False
May 24, 2013 at 03:31 PM
/api/public/snipt/62165/
perl-convert-dos-to-unix
<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 id="L-1"><a name="L-1"></a><span class="go">perl -pi -e &#39;s/\r\n|\n|\r/\r\n/g&#39; file-to-convert # Convert to DOS</span> </span><span id="L-2"><a name="L-2"></a><span class="go">perl -pi -e &#39;s/\r\n|\n|\r/\n/g&#39; file-to-convert # Convert to UNIX</span> </span></pre></div> </td></tr></table>
convert, csv, dos, perl, unix

Bash

Batch Convert CLRF to LF

find . -type f -exec perl -pi -e 's/\r\n?/\n/g' {} \;
https://snipt.net/embed/6a39fef114e96fe2c37001fc0a3b5492/
https://snipt.net/raw/6a39fef114e96fe2c37001fc0a3b5492/
6a39fef114e96fe2c37001fc0a3b5492
bash
Bash
1
2016-09-28T04:15:33
True
False
False
/api/public/snipt/24930/
batch-convert-clrf-to-lf
<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 id="L-1"><a name="L-1"></a>find . -type f -exec perl -pi -e <span class="s1">&#39;s/\r\n?/\n/g&#39;</span> <span class="o">{}</span> <span class="se">\;</span> </span></pre></div> </td></tr></table>
"line endings", dos, unix

Batchfile

unregister and re-register all dll in current folder

for %A in (*.dll) do regsvr32 /u /s %A && regsvr32 /s %A
https://snipt.net/embed/22a6b08e2b788712f0c00efe0d939133/
https://snipt.net/raw/22a6b08e2b788712f0c00efe0d939133/
22a6b08e2b788712f0c00efe0d939133
bat
Batchfile
1
2016-09-29T04:27:01
True
False
False
/api/public/snipt/20833/
unregister-and-re-register-all-dll-in-current-folder
<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 id="L-1"><a name="L-1"></a><span class="k">for</span> <span class="nv">%A</span> in (*.dll) <span class="k">do</span> regsvr<span class="m">32</span> <span class="n">/u</span> <span class="n">/s</span> <span class="nv">%A</span> &amp;&amp; regsvr<span class="m">32</span> <span class="n">/s</span> <span class="nv">%A</span> </span></pre></div> </td></tr></table>
dos

Text only

remote desktop in console

mstsc /console
https://snipt.net/embed/0b662d1381c2f509a5fc0532016fad94/
https://snipt.net/raw/0b662d1381c2f509a5fc0532016fad94/
0b662d1381c2f509a5fc0532016fad94
text
Text only
1
2016-09-23T03:23:46
True
False
False
/api/public/snipt/18552/
remote-desktop-in-console
<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 id="L-1"><a name="L-1"></a>mstsc /console </span></pre></div> </td></tr></table>
dos

Text only

How to temporarily disable the annoying "Restart row" dialog from Windows XP's automatic updates

1
2
3
4
5
6
If you want to temporarily disable the annoying "Restart row" dialog from Windows XP's automatic updates, open the command console and type:

net stop "automatic updates" (or "aggiornamenti automatici" if you are using italian language localization)

This doesn't disable the automatic updates service, but just stops it.
The next time you start up your computer, it will restart.
https://snipt.net/embed/94be8301bd4d8f5850d363cc3edfc791/
https://snipt.net/raw/94be8301bd4d8f5850d363cc3edfc791/
94be8301bd4d8f5850d363cc3edfc791
text
Text only
6
2016-09-22T12:41:49
True
False
False
/api/public/snipt/15472/
how-to-temporarily-disable-the-annoying-restart-row-dialog-from-windows-xps-automatic-updates
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>If you want to temporarily disable the annoying &quot;Restart row&quot; dialog from Windows XP&#39;s automatic updates, open the command console and type: </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>net stop &quot;automatic updates&quot; (or &quot;aggiornamenti automatici&quot; if you are using italian language localization) </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>This doesn&#39;t disable the automatic updates service, but just stops it. </span><span id="L-6"><a name="L-6"></a>The next time you start up your computer, it will restart. </span></pre></div> </td></tr></table>
dialog, dos, net, stop, updates, windows
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.