Posts

Showing posts with the label decode

Encode and Decode on FreeBSD

Base64  Encode % echo -n "Hello World!" | base64 -e SGVsbG8gV29ybGQh -n   Do NOT print the trailing newline character.  |  The output(stdout) text of  echo -n "Hello World!" is passed to base64 -e directly as input(stdin).  -e   Encode  Decode % echo "SGVsbG8gV29ybGQh" | base64 -d Hello World! -d Decode   URI Encode % echo -n "http://google.com/index.php?id=1'" | python3 -c "import sys;import urllib.parse; print(urllib.parse.quote(sys.stdin.read()));" http%3A//google.com/index.php%3Fid%3D1%27 Decode % echo "http%3A//google.com/index.php%3Fid%3D1%27" | unvis -eh   http://google.com/index.php?id=1'   -e       Don't decode  \  escaped sequences.   -h       Decode using the URI encoding from RFC 1808.  (VIS_HTTP1808) Hexadecimal % echo -n "Hello" | od -A n -t x1 48  65  6c  6c  6f The echo program will provide the string to the next comma...