snipt

Ctrl+h for KB shortcuts

Batchfile

CMD – Run Program

start "" [/wait] test.exe [params]
https://snipt.net/embed/d450ec056220b52ea94da6842f09903e/
https://snipt.net/raw/d450ec056220b52ea94da6842f09903e/
d450ec056220b52ea94da6842f09903e
bat
Batchfile
1
2016-09-27T13:19:06
True
False
False
Oct 31, 2012 at 09:04 AM
/api/public/snipt/49364/
cmd-run-program
<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>start <span class="s2">&quot;&quot;</span> [<span class="n">/wait]</span> test.exe [params] </span></pre></div> </td></tr></table>
cmd, run

Batchfile

CMD – Call VBScript

cscript //NoLogo //B my.vbs
https://snipt.net/embed/cc4342ed6d3dfbaf83ba102ad78d1afd/
https://snipt.net/raw/cc4342ed6d3dfbaf83ba102ad78d1afd/
cc4342ed6d3dfbaf83ba102ad78d1afd
bat
Batchfile
1
2016-09-29T21:15:00
True
False
False
/api/public/snipt/49224/
cmd-call-vbscript
<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>cscript <span class="n">//NoLogo</span> <span class="n">//B</span> my.vbs </span></pre></div> </td></tr></table>
cmd, run

Text only

run mkswap on any swap partitions in /etc/fstab

1
2
3
4
5
AWK en mkswap on 
http://tldp.org/HOWTO/Linux+FreeBSD-3.html
awk -- '/swap/ && ($1 !~ /#/) { system("mkswap "$1"") }' /etc/fstab

This will run mkswap on any swap partitions in /etc/fstab every time you boot except if they are commented out (having ``#'' as the first character in the line.)
https://snipt.net/embed/38a4daca649d69f6d4ac56fa3f097c03/
https://snipt.net/raw/38a4daca649d69f6d4ac56fa3f097c03/
38a4daca649d69f6d4ac56fa3f097c03
text
Text only
6
2016-09-29T09:00:17
True
False
False
/api/public/snipt/10348/
run-mkswap-on-any-swap-partitions-in-etcfstab
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>AWK en mkswap on </span><span id="L-2"><a name="L-2"></a>http://tldp.org/HOWTO/Linux+FreeBSD-3.html </span><span id="L-3"><a name="L-3"></a>awk -- &#39;/swap/ &amp;&amp; ($1 !~ /#/) { system(&quot;mkswap &quot;$1&quot;&quot;) }&#39; /etc/fstab </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>This will run mkswap on any swap partitions in /etc/fstab every time you boot except if they are commented out (having ``#&#39;&#39; as the first character in the line.) </span></pre></div> </td></tr></table>
/etc/fstab, any, in, mkswap, on, partitions, run, swap

Bash

run banshee from ssh session

1
2
3
4
5
#!/bin/sh
# run banshee from ssh session & auto play queque

export DISPLAY=:0
dbus-launch /usr/bin/banshee --play
https://snipt.net/embed/119b892a633c54572755819b9c61fa10/
https://snipt.net/raw/119b892a633c54572755819b9c61fa10/
119b892a633c54572755819b9c61fa10
bash
Bash
6
2016-09-29T15:54:21
True
False
False
/api/public/snipt/9327/
run-banshee-from-ssh-session
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c">#!/bin/sh</span> </span><span id="L-2"><a name="L-2"></a><span class="c"># run banshee from ssh session &amp; auto play queque</span> </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="nb">export </span><span class="nv">DISPLAY</span><span class="o">=</span>:0 </span><span id="L-5"><a name="L-5"></a>dbus-launch /usr/bin/banshee --play </span></pre></div> </td></tr></table>
dbus, run, ssh

Bash

run a detached process to the background with no output and make it play nice with other processes

nohup nice myprocesstorun &
https://snipt.net/embed/d27277715e29ee7d68ba9e7f952e9693/
https://snipt.net/raw/d27277715e29ee7d68ba9e7f952e9693/
d27277715e29ee7d68ba9e7f952e9693
bash
Bash
1
2016-09-28T08:57:12
True
False
False
/api/public/snipt/3174/
run-a-detached-process-to-the-background-with-no-output-and-make-it-play-nice-with-other-processes
<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>nohup nice myprocesstorun <span class="p">&amp;</span> </span></pre></div> </td></tr></table>
background, bash, detach, job, nice, process, run, script
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.