Skip to content

Instantly share code, notes, and snippets.

@rawyler
rawyler / b64
Created May 28, 2020 11:33
Base64 encode/decode shortcut
#!/bin/bash
ENCODED=$(echo -n $1 | base64)
DECODED=$(echo $1 | base64 --decode 2> /dev/null)
printf "\x1b[33mEncoded:\x1b[0m \x1b[32m$ENCODED\x1b[0m\n"
printf "\x1b[33mDecoded:\x1b[0m \x1b[36m$DECODED\x1b[0m\n"