From 82f0830359c282a32ff313fa3c63c26286f9449b Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Wed, 19 Aug 2020 17:46:49 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=A0=BC=E5=BC=8F=E5=8C=96=20base64.m?= =?UTF-8?q?d=20=E6=96=87=E6=A1=A3=E3=80=82=20#181?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- command/base64.md | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/command/base64.md b/command/base64.md index cbee932b0f..e449801bd8 100644 --- a/command/base64.md +++ b/command/base64.md @@ -1,4 +1,5 @@ -## base64 +base64 +=== base64 编码/解码文件或标准输入输出 @@ -8,44 +9,45 @@ base64将`文件`或`标准输入`编码或解码为标准输出; ### 语法 +```shell base64 [OPTION]... [FILE] +``` ### 参数 -``` --d, --decode - 解码 +```shell +-d, --decode # 解码 +-i, --ignore-garbage # 解码时,忽略非字母字符 +-w, --wrap=COLS # 在指定的字符数后自动换行(默认为76), 0 为禁用自动换行 --i, --ignore-garbage - 解码时,忽略非字母字符 - --w, --wrap=COLS - 在指定的字符数后自动换行(默认为76), 0 为禁用自动换行 - ---help 显示此帮助说明并退出 - ---version - 输出版本信息并退出 +--help # 显示此帮助说明并退出 +--version # 输出版本信息并退出 ``` ### 实例 -+ 编码字符串 -``` +编码字符串 + +```bash printf foo|base64 ``` -+ 编码文件 -``` +编码文件 + +```bash base64 file ``` -+ 解码 -``` +解码 + +```bash printf Zm9v|base64 -d ``` -+ 解码文件 -``` +解码文件 + +```bash base64 -d file ``` + + \ No newline at end of file