DEV Community

Cover image for Living in the Shell #1; base64
Babak K. Shandiz
Babak K. Shandiz

Posted on • Originally published at babakks.github.io on

6 2

Living in the Shell #1; base64

Encode inline

echo -n 'Hello World!' | base64
Enter fullscreen mode Exit fullscreen mode

Encode file (into file)

base64 ~/.bashrc > encoded-file.txt
Enter fullscreen mode Exit fullscreen mode
cat ~/.bashrc | base64 > encoded-file.txt
Enter fullscreen mode Exit fullscreen mode

Decode inline

echo -n "SGVsbG8gV29ybGQh" | base64 -d
Enter fullscreen mode Exit fullscreen mode

Decode file (into file)

base64 -d encoded-file.txt > decoded-file.txt
Enter fullscreen mode Exit fullscreen mode
cat encoded-file.txt | base64 -d > decoded-file.txt
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Billboard image

Try REST API Generation for MS SQL Server.

DevOps for Private APIs. With DreamFactory API Generation, you get:

  • Auto-generated live APIs mapped from database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay