PBS logo: a tiny ninja with a pale face surrounded on either side by two squiggly brackets denoting programming. Get it? Ninja is stealthy!

CCATP #767 – Bart Busschots on PBS 150 of X – Bash Script Plumbing (Take Two)

When Bart and I recorded PBS 150 on Bash Script Terminal Plumbing, neither of us was happy with it. I got very confused in the middle, and Bart decided that his original strategy might have been flawed in which he assumed everyone had heard Taming the Terminal and remembered everything taught more than 4 years ago. He completely rewrote the shownotes and we re-recorded the entire episode. It was ever so much more fun and I really understood what he was teaching this time through. He also realized after we recorded that there was a bit of information he hadn’t taught us which was crucial to being able to complete the challenge he had set for us. If you understood PBS 150 the first time through and want to jump right to the new part, I put a chapter mark in the audio file that will take you to where he explains /dev/tty.

We’re proud to have done this because we are both of the same mind that we need to stay committed to the quality of what we’re creating here, both for the current listeners and the future learners.

Bart and I took a few minutes upfront to high-five each other for 150 episodes of the Programming By Stealth Podcast. Then we quickly got to work.

Back in the Taming the Terminal podcast (at ttt.bartificer.net/…, Bart taught us about stream redirection, or what he likes to call Terminal Plumbing. This was a long time ago and many folks may not have listened to that great series. Bart takes us through it again but from the perspective of writing Bash scripts that can do everything we can do in the Terminal. We learn about Standard Input (STDIN), Standard Output (STDOUT), and Standard Error (STDERR). We also learn how to bifurcate STDOUT and STDERR to produce desired results. He walks us through how to use the symbols >, <, and our friend the pipe | to redirect output from commands and files. I did get stuck for quite a while in a few spots here and there. Bart continues to try to convince me that if I’m confused, at least one other learner is as well, so hopefully making Bart find different ways to explain these things to help me will help you.

You can find Bart’s fabulous tutorial shownotes at pbs.bartificer.net.

mp3 download

Read an unedited, auto-generated transcript: CCATP_2023_05_13

Join our Slack at podfeet.com/slack and look for the #pbs channel, and check out our pbs-student GitHub Organization. It’s by invitation only but all you have to do is ask Allison!

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top