Created
August 9, 2019 08:31
-
-
Save ixqbar/d16e9fcd4bfc987c54c06793a2aa2c72 to your computer and use it in GitHub Desktop.
base64copy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```bash | |
#!/bin/bash | |
function __base64 { | |
if [ "$1x" == "x" ]; then | |
return | |
fi | |
phpCommand="echo base64_encode(file_get_contents('$1'));" | |
php -r "$phpCommand" | pbcopy | |
} | |
__base64 $@ | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment