Save this video — free

Lecture 11: tr command; Arrays

Burton Ma · 50:10 · Watch on YouTube

Lecture 11: tr command; Arrays Watch on YouTube →

Overview

Burton Ma explains Bash’s `tr` command for character-by-character translation, deletion, and squeezing, then shows how Bash arrays work—including sparse indexes, safe expansion, iteration, concatenation, and input. The practical emphasis is avoiding silent array-reference mistakes and quoting variable expansions, especially filenames with spaces.

Key takeaways

Chapters

0:00 Using Bash `tr` for Character-by-Character Replacement
6:00 Character Ranges, Unequal Sets, and Duplicate Characters in `tr`
10:30 Deleting Characters and Squeezing Repeated Spaces with `tr`
15:00 Creating Bash Arrays and Accessing Sparse Integer Indexes
20:00 Avoiding Bash Array Dereference Mistakes and Declaring Arrays
25:00 Initializing Arrays and Counting Their Elements
30:00 Choosing Safe `[@]` and `[*]` Array Expansions
36:00 Iterating Over the Indexes Actually Used by an Array
39:00 Concatenating Bash Arrays and Appending One Element
42:00 Reading Input into Arrays and Quoting Filenames

Keep these chapters and the full searchable transcript in your own library.

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Burton Ma.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.