You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
arthas/assets/base64.html.00f201c7.js

12 lines
2.9 KiB
JavaScript

import{_ as e,o as a,c as s,d as n}from"./app.5024572d.js";const t={},i=n(`<h1 id="base64" tabindex="-1"><a class="header-anchor" href="#base64" aria-hidden="true">#</a> base64</h1><div class="custom-container tip"><p class="custom-container-title">TIP</p><p>Encode and decode using Base64 representation.</p></div><h2 id="encode-to-base64" tabindex="-1"><a class="header-anchor" href="#encode-to-base64" aria-hidden="true">#</a> Encode to base64</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code><span class="token punctuation">[</span>arthas@70070<span class="token punctuation">]</span>$ <span class="token builtin class-name">echo</span> <span class="token string">&#39;abc&#39;</span> <span class="token operator">&gt;</span> /tmp/test.txt
<span class="token punctuation">[</span>arthas@70070<span class="token punctuation">]</span>$ <span class="token function">cat</span> /tmp/test.txt
abc
<span class="token punctuation">[</span>arthas@70070<span class="token punctuation">]</span>$ base64 /tmp/test.txt
<span class="token assign-left variable">YWJjCg</span><span class="token operator">==</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="encode-to-base64-and-save-output-to-file" tabindex="-1"><a class="header-anchor" href="#encode-to-base64-and-save-output-to-file" aria-hidden="true">#</a> Encode to base64 and save output to file</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ base64 <span class="token parameter variable">--input</span> /tmp/test.txt <span class="token parameter variable">--output</span> /tmp/result.txt
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h2 id="decode-from-base64" tabindex="-1"><a class="header-anchor" href="#decode-from-base64" aria-hidden="true">#</a> Decode from base64</h2><div class="language-text ext-text line-numbers-mode"><pre class="language-text"><code>$ base64 -d /tmp/result.txt
abc
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="decode-from-base64-and-save-output-to-file" tabindex="-1"><a class="header-anchor" href="#decode-from-base64-and-save-output-to-file" aria-hidden="true">#</a> Decode from base64 and save output to file</h2><div class="language-bash ext-sh line-numbers-mode"><pre class="language-bash"><code>$ base64 <span class="token parameter variable">-d</span> /tmp/result.txt <span class="token parameter variable">--output</span> /tmp/bbb.txt
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,10),d=[i];function c(o,r){return a(),s("div",null,d)}const p=e(t,[["render",c],["__file","base64.html.vue"]]);export{p as default};