Hide Environment Variables From Your History Published by Nathan Webster on 28 October 2022 Here’s a neat little trick I learned today; if you want to hide the value of an Environment variable from your history/logs, put a space before the export command! Photo by Arnold Francisca on Unsplash Here’s an example: export NATHAN=fooecho $NATHANfoo export NATHAN=barecho $NATHANbarhistory10083 export NATHAN=foo10084 echo $NATHAN10084 echo $NATHAN Particularly helpful if you are using secrets as Environment variables and you don’t want these to make it through to centralised logging platforms. Enjoy! Tags: Engineering, Tips Back to Blog Tweet
Here’s a neat little trick I learned today; if you want to hide the value of an Environment variable from your history/logs, put a space before the export command! Photo by Arnold Francisca on Unsplash Here’s an example: export NATHAN=fooecho $NATHANfoo export NATHAN=barecho $NATHANbarhistory10083 export NATHAN=foo10084 echo $NATHAN10084 echo $NATHAN Particularly helpful if you are using secrets as Environment variables and you don’t want these to make it through to centralised logging platforms. Enjoy!
We're excited to announce that we’ve been recognized in Hired’s 2023 List of Top Employers Winning Tech Talent. Here’s how we did it At Daemon, we don’t just measure success in financial terms. One of our North Star ambitions is to... Read More
Our Head of Cloud, Paul Campbell, breaks down the typical cloud migration journey Cloud migration can be a daunting prospect. The complexity of moving everything from physical... Read More
How Daemon can help businesses become more efficient by using AI Everyone is talking about AI. A range of AI-driven tools like ChatGPT, Midjourney and Copilot have... Read More