sh base64_to_clipboard.sh [file]
to encode the file and copy the output to the clipboard.
- Drop base64_to_clipboard.sh in
~/.scripts
. - Add
alias base="sh ~s/.scripts/base64_to_clipboard.sh"
to your.bash_profile
. base [file]
.
Code stolen from Mathias Bynens.