snipt

Ctrl+h for KB shortcuts

S

collect cazy with sulfaltase

sulfatase <- c(as.character(unique(pfam_cazy[grep('Sulfatase',pfam_cazy$pfam),2])))
https://snipt.net/embed/608ba8345d750b35dc5097bd17777822/
/raw/608ba8345d750b35dc5097bd17777822/
608ba8345d750b35dc5097bd17777822
splus
S
2
2019-07-13T03:23:58
True
False
False
/api/public/snipt/25459/
collect-cazy-with-sulfaltase
<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>sulfatase <span class="o">&lt;-</span> <span class="kt">c</span><span class="p">(</span><span class="kp">as.character</span><span class="p">(</span><span class="kp">unique</span><span class="p">(</span>pfam_cazy<span class="p">[</span><span class="kp">grep</span><span class="p">(</span><span class="s">&#39;Sulfatase&#39;</span><span class="p">,</span>pfam_cazy<span class="o">$</span>pfam<span class="p">),</span><span class="m">2</span><span class="p">])))</span> </span></pre></div> </td></tr></table>
cazy, grep, r, unique

Bash

extracting unique IPs from a log

egrep -o "10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}" access.log | sort -u
https://snipt.net/embed/444e0c41925a382abe8fdce3679ca523/
/raw/444e0c41925a382abe8fdce3679ca523/
444e0c41925a382abe8fdce3679ca523
bash
Bash
1
2019-07-17T13:01:00
True
False
False
/api/public/snipt/6869/
extracting-unique-ips-from-a-log
<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>egrep -o <span class="s2">&quot;10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}&quot;</span> access.log <span class="p">|</span> sort -u </span></pre></div> </td></tr></table>
ip, log, unique