Command base64


This command is part of the posix extensions and needs to be imported to be available to the shell.
See Posix Commands

Name

base64 encodes or decodes files to/from base64


Synopsis

base64 [options] [file]


Options


-w,-wrapWraps lines at 76 chars
-d,-decodeDecodes base64 (default, encode)


Description


Without -d, base64 encodes file (or stdin if no file specified) to base64 encoding and writes to stdout.
-w or -wrap specifies to wrap lines at 76 characters (encode only)

-d or -decode decodes instead of encodes and accepts either raw or wrapped base64 as input, and outputs the decoded file on stdout.

Example

echo Hello | base64


Result
SGVsbG8NCg==


echo Hello | base64 | base64 -d


Result
Hello


base64 file.dat > file.b64










Return Value

Returns 0 if the command executed successfully, 1 if there was an error.

Commands
CategoryCommands
CommandsPosix
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki