2014-07-14 21:50:44 +08:00
|
|
|
# base64
|
|
|
|
|
2019-01-21 18:34:59 +01:00
|
|
|
> Encode or decode file or standard input to/from Base64, to standard output.
|
2021-04-01 17:54:26 +02:00
|
|
|
> More information: <https://www.gnu.org/software/coreutils/base64>.
|
2014-07-14 21:50:44 +08:00
|
|
|
|
2021-04-11 11:07:45 -04:00
|
|
|
- Encode the contents of a file as base64 and write the result to stdout:
|
2014-07-14 21:50:44 +08:00
|
|
|
|
|
|
|
`base64 {{filename}}`
|
|
|
|
|
2021-04-11 11:07:45 -04:00
|
|
|
- Decode the base64 contents of a file and write the result to stdout:
|
2014-07-14 21:50:44 +08:00
|
|
|
|
2021-03-07 23:58:11 +01:00
|
|
|
`base64 --decode {{filename}}`
|
2014-07-14 21:50:44 +08:00
|
|
|
|
2021-01-31 14:05:18 -03:00
|
|
|
- Encode from stdin:
|
2014-07-14 21:50:44 +08:00
|
|
|
|
|
|
|
`{{somecommand}} | base64`
|
|
|
|
|
2021-01-31 14:05:18 -03:00
|
|
|
- Decode from stdin:
|
2014-07-14 21:50:44 +08:00
|
|
|
|
2021-03-07 23:58:11 +01:00
|
|
|
`{{somecommand}} | base64 --decode`
|