Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes every weekday Monday through Friday.
This page was generated by The HPR Robot at


In-Depth Series: Bash Scripting

  • Number of episodes: 63
  • Open/closed: open
  • Date of earliest show: 2010-03-24
  • Date of latest show: 2024-04-03
  • Series RSS feeds: ogg, spx, mp3
This is an open series in which Hacker Public Radio Listeners can share their Bash scripting knowledge and experience with the community. General programming topics and Bash commands are explored along with some tutorials for the complete novice.

hpr4088 :: Today I Learnt more Bash tips hosted by Some Guy On The Internet

Wednesday, 2024-04-03. 00:23:39. Clean.
Bash tips, TIL, getopts.

Sgoti talks about supplying options to bash scripts

Listen in ogg, spx, or mp3 format.

hpr3985 :: Bash snippet - be careful when feeding data to loops hosted by Dave Morriss

Friday, 2023-11-10. 00:27:24. Explicit.
Bash, loop, process, shell.

A loop in a pipeline runs in a subshell

Listen in ogg, spx, or mp3 format.

hpr3962 :: It's your data hosted by Ken Fallon

Tuesday, 2023-10-10. 00:07:22. Clean.
response, bash, rss, xml, xmlstarlet.

Ken shows a safer way to get episodes from HPR

Listen in ogg, spx, or mp3 format.

hpr3959 :: Download any HPR series with english file names hosted by gemlog

Thursday, 2023-10-05. 00:02:45. Explicit.
Bash, sed, grep, wget, scraper.

A dir with the series name will be created and all shows will be renamed to ShowTitle.mp3 inside it

Listen in ogg, spx, or mp3 format.

hpr3928 :: RE: Klaatu. hosted by Some Guy On The Internet

Wednesday, 2023-08-23. 00:24:27. Explicit.
Bash scripting, bash commands, bash_aliases.

Sgoti confuses everyone with bash nonsense.

Listen in ogg, spx, or mp3 format.

hpr3882 :: Alternatives to the cd command hosted by Klaatu

Tuesday, 2023-06-20. 00:10:32. Clean.
bash, linux.

Navigate your filesystem without cd

Listen in ogg, spx, or mp3 format.

hpr3811 :: mkfifo and named pipes hosted by Klaatu

Monday, 2023-03-13. 00:11:18. Clean.
pipe, fifo, mkfifo, Linux, shell.

Have you ever named a pipe? If not, this is the episode you've been waiting for.

Listen in ogg, spx, or mp3 format.

hpr3722 :: Bash snippet - plurals in messages hosted by Dave Morriss

Tuesday, 2022-11-08. 00:08:33. Explicit.
Bash, plural, ngettext.

How to use English singular and plural words in messages

Listen in ogg, spx, or mp3 format.

hpr3713 :: Bash snippet - short-circuit evaluation in Bash Boolean expressions hosted by Dave Morriss

Wednesday, 2022-10-26. 00:16:40. Explicit.
Bash, Boolean expression, short-circuit evaluation.

Found I could do this in Bash, so wanted to share!

Listen in ogg, spx, or mp3 format.

hpr3625 :: Shell Tips and Snippets - Collaborative Effort hosted by Carl

Friday, 2022-06-24. 00:20:25. Clean.
shell.

Carl and special guests provide some shell tips and examples.

Listen in ogg, spx, or mp3 format.

hpr3551 :: Bash snippet - some possibly helpful hints hosted by Dave Morriss

Monday, 2022-03-14. 00:24:35. Explicit.
Bash, eval, mapfile, environment variables.

Using 'eval', 'mapfile' and environment variables

Listen in ogg, spx, or mp3 format.

hpr3413 :: Bash snippet - using coproc with SQLite hosted by Dave Morriss

Wednesday, 2021-09-01. 00:45:38. Explicit.
Bash, coproc, subshell, coprocess, pipe, file descriptor.

Sending multiple queries to a running instance of sqlite3

Listen in ogg, spx, or mp3 format.

hpr3071 :: Bash snippet - quotes inside quoted strings hosted by Dave Morriss

Monday, 2020-05-11. 00:13:19. Explicit.
Bash, quotes.

How to add quotes to quoted strings in Bash

Listen in ogg, spx, or mp3 format.

hpr3013 :: Bash Tips - 21 hosted by Dave Morriss

Wednesday, 2020-02-19. 00:41:37. Explicit.
Bash, variable, environment, environment variable.

Environment variables

Listen in ogg, spx, or mp3 format.

hpr2877 :: Using Zenity with Pdmenu hosted by Dave Morriss

Tuesday, 2019-08-13. 00:22:38. Explicit.
zenity, Bash scripting, pdmenu, GTK+.

Zenity is a rather cool program that will display GTK+ dialogs from a script

Listen in ogg, spx, or mp3 format.

hpr2807 :: Are bash local variables local? hosted by clacke

Tuesday, 2019-05-07. 00:11:01. Clean.
bash, perl, scope, dynamic scope, lexical scope.

A lesson on dynamic scope vs lexical scope

Listen in ogg, spx, or mp3 format.

hpr2793 :: bash coproc: the future (2009) is here hosted by clacke

Wednesday, 2019-04-17. 00:21:16. Clean.
bash, coproc, subshell.

clacke discovers bash's coproc keyword and explains some toy examples

Listen in ogg, spx, or mp3 format.

hpr2756 :: Bash Tips - 20 hosted by Dave Morriss

Monday, 2019-02-25. 00:32:35. Explicit.
Bash, array, delete, positional parameters.

Deleting arrays; positional and special parameters in Bash

Listen in ogg, spx, or mp3 format.

hpr2739 :: Bash Tips - 19 hosted by Dave Morriss

Thursday, 2019-01-31. 00:25:53. Explicit.
Bash, array, declare, typeset, local, readonly, read, mapfile, readarray.

Arrays in Bash (part 4)

Listen in ogg, spx, or mp3 format.

hpr2736 :: Response to show 2720 hosted by Dave Morriss

Monday, 2019-01-28. 00:18:24. Explicit.
Bash, ShellCheck.

Some suggestions on how to improve a Bash script

Listen in ogg, spx, or mp3 format.

hpr2729 :: Bash Tips - 18 hosted by Dave Morriss

Thursday, 2019-01-17. 00:31:38. Explicit.
Bash, array, indexed array, associative array, parameter expansion.

Arrays in Bash (part 3)

Listen in ogg, spx, or mp3 format.

hpr2719 :: Bash Tips - 17 hosted by Dave Morriss

Thursday, 2019-01-03. 00:34:16. Explicit.
Bash, array, indexed array, associative array.

Arrays in Bash (part 2)

Listen in ogg, spx, or mp3 format.

hpr2709 :: Bash Tips - 16 hosted by Dave Morriss

Thursday, 2018-12-20. 00:24:00. Explicit.
Bash, array, indexed array, associative array.

Arrays in Bash (part 1)

Listen in ogg, spx, or mp3 format.

hpr2699 :: Bash Tips - 15 hosted by Dave Morriss

Thursday, 2018-12-06. 00:29:54. Explicit.
Bash, loop, ls, pipe, pipeline, find, extglob.

Some of the pitfalls when using loops in Bash

Listen in ogg, spx, or mp3 format.

hpr2689 :: Bash Tips - 14 hosted by Dave Morriss

Thursday, 2018-11-22. 00:28:08. Explicit.
Bash, loop, for, break, continue.

More about loops - the 'for' loop, 'break' and 'continue'

Listen in ogg, spx, or mp3 format.

hpr2679 :: Extra ancillary Bash tips - 13 hosted by Dave Morriss

Thursday, 2018-11-08. 00:36:42. Explicit.
Bash, extended test, regular expression, capture group, BASH_REMATCH, back reference.

Making decisions in Bash (part 5)

Listen in ogg, spx, or mp3 format.

hpr2669 :: Additional ancillary Bash tips - 12 hosted by Dave Morriss

Thursday, 2018-10-25. 00:28:22. Explicit.
Bash, test, regular expression.

Making decisions in Bash (part 4)

Listen in ogg, spx, or mp3 format.

hpr2659 :: Further ancillary Bash tips - 11 hosted by Dave Morriss

Thursday, 2018-10-11. 00:28:22. Explicit.
Bash, test, conditional expression, string comparison, pattern.

Making decisions in Bash (part 3)

Listen in ogg, spx, or mp3 format.

hpr2649 :: More ancillary Bash tips - 10 hosted by Dave Morriss

Thursday, 2018-09-27. 00:22:52. Explicit.
Bash, test, while, until, if, case.

Making decisions in Bash (part 2)

Listen in ogg, spx, or mp3 format.

hpr2639 :: Some ancillary Bash tips - 9 hosted by Dave Morriss

Thursday, 2018-09-13. 00:21:45. Explicit.
Bash, test, true, false.

Making decisions in Bash (part 1)

Listen in ogg, spx, or mp3 format.

hpr2496 :: Making a Raspberry Pi inventory hosted by Dave Morriss

Monday, 2018-02-26. 00:11:10. Explicit.
Raspberry Pi, RPi.

How to collect identifying information about RPi devices

Listen in ogg, spx, or mp3 format.

hpr2483 :: Useful Bash functions - part 4 hosted by Dave Morriss

Wednesday, 2018-02-07. 00:39:46. Explicit.
coding, Bash, script, function.

A Bash function for parsing lists of numbers and ranges

Listen in ogg, spx, or mp3 format.

hpr2469 :: A flight itinerary in Bash hosted by Dave Morriss

Thursday, 2018-01-18. 00:17:45. Explicit.
Bash, date, ISO 8601, epoch.

Working out dates and times in a Bash script

Listen in ogg, spx, or mp3 format.

hpr2448 :: Useful Bash functions - part 3 hosted by Dave Morriss

Wednesday, 2017-12-20. 00:33:53. Explicit.
coding, Bash, script, function.

A few more possibly useful Bash functions are discussed

Listen in ogg, spx, or mp3 format.

hpr2349 :: Customizing my bash prompt hosted by Windigo

Thursday, 2017-08-03. 00:24:12. Explicit.
bash, command line, configuration, terminal.

A detailed look into how, and why, to customize a bash prompt.

Listen in ogg, spx, or mp3 format.

hpr2317 :: Bash snippet - extglob and scp hosted by Dave Morriss

Tuesday, 2017-06-20. 00:28:27. Explicit.
Bash, shopt, filename expansion, scp, rsync.

How does scp manage extended glob patterns?

Listen in ogg, spx, or mp3 format.

hpr2302 :: Bash snippet - nullglob hosted by Dave Morriss

Tuesday, 2017-05-30. 00:07:08. Explicit.
Bash, shopt, nullglob, filename expansion.

After learning about the nullglob option I have started to use it

Listen in ogg, spx, or mp3 format.

hpr2293 :: More supplementary Bash tips hosted by Dave Morriss

Wednesday, 2017-05-17. 00:38:25. Explicit.
Bash, expansion, filename expansion, extglob, extended pattern matching.

Finishing off the subject of expansion in Bash (part 2)

Listen in ogg, spx, or mp3 format.

hpr2278 :: Some supplementary Bash tips hosted by Dave Morriss

Wednesday, 2017-04-26. 00:39:35. Explicit.
Bash, expansion, pathname expansion, shopt.

Finishing off the subject of expansion in Bash (part 1)

Listen in ogg, spx, or mp3 format.

hpr2135 :: Audio speedup script hosted by Dave Morriss

Friday, 2016-10-07. 00:27:59. Explicit.
bash, sox, speed.

I want to speed up some of my podcasts and truncate silence in them too so I wrote a script to do it

Listen in ogg, spx, or mp3 format.

hpr2096 :: Useful Bash functions - part 2 hosted by Dave Morriss

Monday, 2016-08-15. 00:23:21. Explicit.
coding, Bash, script, function.

The further development of a Bash function that may be of use in your scripts

Listen in ogg, spx, or mp3 format.

hpr2045 :: Some other Bash tips hosted by Dave Morriss

Friday, 2016-06-03. 00:55:53. Explicit.
Bash, expansion, process substitution, word splitting.

Yet more information about types of expansion in Bash

Listen in ogg, spx, or mp3 format.

hpr2003 :: Using the Incron file watching daemon hosted by Mr. Young

Wednesday, 2016-04-06. 00:11:38. Explicit.
incron, bash, watcher, daemon.

I briefly introduce the incron file watching daemon, and give an example of how I use it.

Listen in ogg, spx, or mp3 format.

hpr1990 :: Pomodoro Timer - The Evolution of a Script part deux hosted by Nacho Jordi

Friday, 2016-03-18. 00:28:54. Clean.
Productivity, Bash basics, Programming design, Pomodoro, Timer, loops, sleep.

Further evolutions of a pomodoro script that got a life of its own

Listen in ogg, spx, or mp3 format.

hpr1987 :: Pomodoro Timer - The Evolution of a Script (pt 1) hosted by Nacho Jordi

Tuesday, 2016-03-15. 00:22:07. Clean.
Productivity, Bash basics, Programming design, Pomodoro, Timer, loops, sleep.

The different stages of a bash script that was created accidentally

Listen in ogg, spx, or mp3 format.

hpr1952 :: Time now Ladies and Gents hosted by Ken Fallon

Tuesday, 2016-01-26. 00:31:00. Clean.
fix_tags, ffprobe, ffmpeg, bc, sed, awk, grep, time, iso8601, date, mediainfo, xmlstarlet.

How to get the total duration of a lot of media files.

Listen in ogg, spx, or mp3 format.

hpr1951 :: Some additional Bash tips hosted by Dave Morriss

Monday, 2016-01-25. 00:40:24. Explicit.
Bash, expansion, arithmetic expansion, shell arithmetic, number base.

More about expansion in Bash: this time arithmetic expansion

Listen in ogg, spx, or mp3 format.

hpr1903 :: Some further Bash tips hosted by Dave Morriss

Wednesday, 2015-11-18. 00:29:18. Explicit.
Bash, expansion, tilde expansion, command substitution.

Some more information about types of expansion in Bash

Listen in ogg, spx, or mp3 format.

hpr1884 :: Some more Bash tips hosted by Dave Morriss

Thursday, 2015-10-22. 00:15:49. Explicit.
Bash, brace expansion, seq.

Some information about brace expansion in Bash that you might not know

Listen in ogg, spx, or mp3 format.

hpr1843 :: Some Bash tips hosted by Dave Morriss

Wednesday, 2015-08-26. 00:21:17. Explicit.
Bash, pushd, popd, dirs.

A few useful Bash features that may not be well known

Listen in ogg, spx, or mp3 format.

hpr1838 :: Waking up with Windigo hosted by Windigo

Wednesday, 2015-08-19. 00:15:25. Clean.
bash, scripting, terrible.

An overview of a terrible, hacky method of waking up.

Listen in ogg, spx, or mp3 format.

hpr1791 :: Organizing Photos with Bash hosted by Tony Pelaez

Monday, 2015-06-15. 00:31:15. Explicit.
bash, photography, automation.

Use bash to simplify the process of organizing and backing up photographs.

Listen in ogg, spx, or mp3 format.

hpr1757 :: Useful Bash functions hosted by Dave Morriss

Tuesday, 2015-04-28. 00:27:42. Explicit.
coding, Bash, script, function.

Some Bash functions that may be of use in your scripts

Listen in ogg, spx, or mp3 format.

hpr1710 :: Windows Remote Desktop on GNU/Linux hosted by Ken Fallon

Friday, 2015-02-20. 00:11:19. Clean.
bash, xfreerdp, rdesktop, remmina.

A wrapper script for xfreerdp to make connecting to windows servers painless

Listen in ogg, spx, or mp3 format.

hpr1648 :: Bash parameter manipulation hosted by Dave Morriss

Wednesday, 2014-11-26. 00:40:33. Explicit.
Bash, script, parameter, variable.

A summary and aide memoire of Bash parameter expansion methods

Listen in ogg, spx, or mp3 format.

hpr1430 :: thebestofyoutube.com download script hosted by Ken Fallon

Friday, 2014-01-24. 00:38:32. Explicit.
Bash, YouTube, download.

A hacked script to download youtube videos

Listen in ogg, spx, or mp3 format.

hpr1247 :: Recording Terrestrial Radio with bash scripts and cron jobs hosted by Jon Kulp

Tuesday, 2013-05-14. 00:14:36. Explicit.
bash, scripting, radio, streamripper, simple audio player.

Using a Bash script to capture terrestrial radio

Listen in ogg, spx, or mp3 format.

hpr1204 :: My Magnatune Downloader hosted by Dave Morriss

Thursday, 2013-03-14. 00:21:59. Explicit.
Magnatune, API, Bash, XML, XSLT, xsltproc.

How I download albums from Magnatune with Bash and Perl scripts

Listen in ogg, spx, or mp3 format.

hpr1197 :: What I do with bash scripts hosted by Jon Kulp

Tuesday, 2013-03-05. 00:27:18. Explicit.
Bash, scripting.

Some personal anecdotes on writing Bash scripts

Listen in ogg, spx, or mp3 format.

hpr598 :: Bash Scripting: Episode 2 Command Line Basics hosted by Ken Fallon

Wednesday, 2010-11-17. 00:38:33. Explicit.
bash, cli, command line.

Introduction to the man, info, and appropos commands, among other basics

Listen in ogg, spx, or mp3 format.

hpr562 :: Introduction to bash scripting hosted by Ken Fallon

Wednesday, 2010-08-11. 00:20:32. Explicit.
bash, bash basics, bash scripting.

Introduction to bash scripting, with quick explanations of many adjacent concepts

Listen in ogg, spx, or mp3 format.

hpr543 :: Xoke's Podcasting Script hosted by Xoke

Monday, 2010-05-24. 00:08:55. Explicit.
shell, scripts, scripting, bash.

An introduction to a script for recording podcasts

Listen in ogg, spx, or mp3 format.

hpr531 :: bash loops hosted by Ken Fallon

Wednesday, 2010-03-24. 00:08:32. Explicit.
bash, loops, while loops, for loops, scripting, bash scripting.

While aboard an Airbus 320, Ken Fallon describes loops that are available in BASH

Listen in ogg, spx, or mp3 format.