S6E2: "Environmental Protection"

Posted
Modified
Comments 0

Navigation
Previous EpisodeNext Episode
Log
Recorded (UTC) Aired (UTC) Editor
2021-03-04 03:48:26 2021-03-14 04:18:24 "Edita"
Verification
Format SHA256 GPG Audio File
MP3 ed99af7301c0b0766803e606a7c517143425e7b7a38c7a18fd7b43b066aedb60 click click
OGG c8402c400aa5736c438e7705129e016c1834648aaff79f2fc9356abd737c4c56 click click
Quicklisten:

We talk about environment variables, how they interact, and how processes use them.

Jthan is the human incarnation of online recipes.

Just the Tip

  • Paden talks about pushd and popd.
    • I also tell the guys about cd - (not cd ~!).

Notes

Starts at 26m40s.

I was drinking water. Paden was drinking a Sprite. Jthan was drinking a GIbson.

  • Environment variables
    • Jthan briefly mentions the env command (env (1))
    • I talk about how to parse /proc/<PID>/environ files by splitting on the nullbyte. (e.g. s.split('\x00'))
    • A common issue is a missing path from ${PATH} within a cron task. The PATH env var must be specified explicitly in cron jobs! (Also, MAILTO! Info here.)
    • Services can (and frequently do) have different environment variables than what you might expect!
      • The systemd EnvironmentFile does not do shell or command interpolation! So you can’t use something like export FOO="BAR", FOO=${BAZ}, or FOO=$(quux).
    • Take note of sudo -E!
    • Jthan mentions prefixing a command with a space to prevent it from being written to the bash history. I mentioned it doesn’t work for my laptop or desktop. I thought it was because I use a custom HISTTIMEFORMAT but it’s actually because Arch Linux follows upstream defaults, and upstream Bash does not set HISTCONTROL whereas CentOS does! Problem solved.

15 Clams

In this segment, Jthan shares with you a little slice of life. The title is a reference to this video. (2m16s in)

Starts at 54m18s.

Jthan wants to know what the best approach is for someone who sees improvements that can be made at a new job.

Errata

  • Jthan and I talk about the G.I. Joe PSA parodies.
  • You can find more info on dash here.
    • And yes, it’s “Debian Almquist SHell”.

Music

Music Credits
Track Title Artist Link Copyright/License
Intro downtowncruise Erich Schall click CC-BY-NC-ND 4.0
Outro Me, Like A Bird Sick With Pneumothorax Noi2er click CC-BY-NC-ND 4.0
(All music is royalty-free, properly licensed for use, used under fair use, or public domain.)

Author
Categories

Comments

There are currently no comments on this article.

Comment...

Enter your comment below. Fields marked * are required. You must preview your comment before submitting it.