# bb64 # Installation Automated system-wide installation: ``` curl -fsSL https://gitea.jde.nz/public/bb64/releases/download/latest/install.sh | bash ``` ## To download just the bb64 executable: ``` curl -fsSL -o bb64 https://gitea.jde.nz/public/bb64/releases/download/latest/bb64.amd64 && chmod a+x bb64 ``` # Use Bash Base64, written in C++. Uses a custom Base64 character set for bash compatibility, not compatible with other utilities. ``` Usage: bb64 BASE64COMMAND Decodes and runs the command bb64 -[i|d] BASE64COMMAND Displays the decoded command bb64 -e COMMAND Encodes the command and prints the result bb64 -u Updates bb64 to the latest version (uses docker) ``` # Implementation Notes bb64 runs the command by replacing the current process, so it ensures that tty, environment variables etc are all identical for the run command. It works with interactive commands, like nano or ssh. bb64 supports bash scripts, as the command is run as: `bash -c 'COMMAND'` Where COMMAND is passed to bash as a single argument. If the command is run, the return value is the return value of the command. If it isn't run, bb64 returns -1.