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 #757 Bart Busschots on PBS 143 — Shell Script Basics

In this week’s episode of Programming By Stealth, Bart Busschots starts building out one more tool in our toolbox: shell scripts. Bart starts with the basics explaining how to tell our little scripts which shell to run using the shebang line, the structure of shell scripts, commenting, assigning, and using variables, and how to write strings without having to escape every space and unusual character.

Throughout the installment, Bart refers back to things we learned in Taming the Terminal podcast and tutorial. If you haven’t listened to or read this series, you can download the book Helma helped us to produce using the Apple Books Store, or access it in a beautiful HTML version at ttt.bartificer.net/…, both of which have the audio of the podcast embedded within. You can find even more formats at podfeet.com/tttbook.

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

mp3 download

Read an unedited, auto-generated transcript: CCATP_2023_01_07

5 thoughts on “CCATP #757 Bart Busschots on PBS 143 — Shell Script Basics

  1. Mark Scheck - April 4, 2023

    Is there a webpage associated with this for the examples. Great podcast btw

  2. podfeet - April 4, 2023

    Sorry about forgetting the link, Mark! I’ve instituted a TextExpander snippet to make sure I don’t forget but it was after I wrote this post. The link is above now but to make sure you see it, it’s: https://pbs.bartificer.net/pbs143

    The format of the links might help: they’re all at pbs.bartificer.net and then / followed by pbs and the episode number.

    Or you can always just go to pbs.bartificer.net and there’s a link list of every installment on the home page.

    So glad you like the podcast!

  3. Mark Scheck - April 4, 2023

    Thank you!!!!

  4. Mark Scheck - April 4, 2023

    I did it a completely mental way. To make it look like the output you were saying.
    echo I like $dessert! ‘Pancakes have ‘ |perl -pe ‘chomp’;echo -n $dessert |wc -c |xargs|tr -d ‘\n’;echo ” letters”

  5. Anonymous - May 5, 2023

    Hey Bart, I switched from my mac to Linux and my one liner stopped working completely! Weirdly perl was throwing errors. Thanks for doing the show, it is awesome and I learn new things every time! I had to redo my super over complicated way. echo -n I like $desert! “$desert has “;echo -n $desert |wc -c |tr -d ‘\n’;echo ” characters in it”

Leave a Reply

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

Scroll to top