The little things give you away... A collection of various small helper stuff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

6 lines
276 B

  1. #!/bin/bash
  2. # Like base64 but for the URL-safe alphabet A-Za-z0-9-_ (instead of A-Za-z0-9+/).
  3. # This works by replacing occurrences of - with + and vice-versa, and likewise with _ and /.
  4. # Does not support passing the filename by argument.
  5. tr -- '\-_+/' '+/\-_' | base64 "$@"