Skip to content

Instantly share code, notes, and snippets.

@pgebert
Created August 3, 2023 09:55
Show Gist options
  • Save pgebert/9de06def8dd6b2d500670eab83901267 to your computer and use it in GitHub Desktop.
Save pgebert/9de06def8dd6b2d500670eab83901267 to your computer and use it in GitHub Desktop.
Encodes and decodes a string on a Linux system.
/**
* Created by pgebert on 03/08/23.
*
* Encodes and decodes a string on a Linux system.
*/
// encode with base64 - Output: SGVsbG8=
echo -n 'Hello' | base64
// decode from base64 - Output: Hello
echo -n 'SGVsbG8=' | base64 --decode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment