``` python -c "import base64; print(base64.b64encode('$INPUT_STRING'.encode('utf-8')).decode('utf-8'))" ```
``` python -c "import base64; print(base64.b64encode('$INPUT_STRING'.encode('utf-8')).decode('utf-8'))" ```
Yes it's easy to set up an alias or shell command or whatever, but that's besides the point :p
The point of ut is not to replace or invent new tooling. It is meant to be a set of tools that are simple, self exploratory and work out of the box with sane defaults. So, essentially, something that you don't have to remember syntax for or go through help/man pages everytime you want to use it.
With GNU coreutils:
$ base64 /dev/zero | head -c 1 | wc -c
1
With uutils doing the same would exhaust your systems memory until either it freezes or oomd kills the process.Just realized `LC_COLLATE=C sort` must be specified if you don't want it to ignore leading underscores in sorting due to LC_COLLATE=en_US.utf8 being the default these days.
https://docs.openssl.org/master/man1/openssl/#command-summar...
$ go run github.com/dolmen-go/goeval@master 'fmt.Println(base64.StdEncoding.EncodeToString([]byte(os.Args[1])))' foobar
Zm9vYmFy $ echo -n foobar | openssl base64 -e
Zm9vYmFy