Categories for Lectures

COMP 10024 – UNIX Process Management – Taking Control

Until now, we have mostly run programs in the foreground—typing a command and waiting for it to finish before the shell gives us back the prompt. However, UNIX is a multitasking environment. To be truly efficient, you must learn how to manage multiple processes at once. 1. Foreground vs. Background Processes When you run a… View Article

COMP 10024 – Regular Expressions – The Art of Pattern Matching

A Regular Expression (or regex) is a specialized language used to describe search patterns. While a simple search looks for a specific word, a regex can look for “any word starting with a capital letter that ends in a number.” It is used extensively in tools like grep, sed, vi, and programming languages like Python… View Article

COMP 10024 – UNIX Pipelines – Connecting the World

In our last module, we explored how to use temporary files to pass data between commands. While functional, that approach was often awkward, inefficient, and, quite frankly, ugly. Today, we learn the “magic” of Pipelines, which allow us to connect processes directly in memory. 1. The Philosophy: Everything is a File At the heart of… View Article

COMP 10024 – UNIX I/O Redirection Controlling the Flow

In our previous sessions, we have been typing commands and seeing the results immediately on the screen. However, in the UNIX world, we say “Everything is a file.” This includes your keyboard and your screen. Because of this, the shell can easily swap where a program gets its data from and where it sends its… View Article

COMP 10024 – Lab: Mastering the Vi Editor

Vi is often the first “hurdle” for new UNIX users. Because it was designed before the mouse or modern cursor keys were standard, it forces you to think differently about how you interact with text. This lab will take you from a Vi novice to a confident editor. Part 1: Entering the Matrix (The Modes)… View Article

COMP 10024 – Assignment ~ The Automated System Administrator (Week 8)

Total Weight: 3 Points Objective: Create a robust Bash script that handles user input, validates the file system, and utilizes loops and conditional logic to automate a common administrative task. The Scenario You have been hired as a Junior SysAdmin. Your first task is to create a tool called inspector.sh. This tool needs to look… View Article

COMP 10024 – Shell Scripting (Week 8)

Shell Scripting A shell script is essentially a text based file containing a sequence of UNIX commands. To the system, it is a method of writing a program that the shell interprets and executes line by line. While you can use many interpreters (like Python or Perl), we will focus on the Bourne Again Shell… View Article

COMP 10024 – UNIX Shell Environment Variables (Week 7)

In our previous sessions, we took a “side trip” into the life-cycle of a UNIX process. We learned about forking, exec-ing, and the parent-child relationship. Why? Because without understanding how processes are born, you cannot understand Environment Variables. 1. Local Variables vs. Environment Variables In the shell, we have two distinct types of variables: Shell… View Article

COMP 10024 – The UNIX Process Life-Cycle (Week 7)

In our previous sessions, we explored the static world of files and permissions. Today, we move into the dynamic world of the UNIX Kernel. If the file system is a library, then a process is a person currently reading a book. One is storage; the other is action. 1. What exactly is a Process? A… View Article

COMP 10024 – Fundamentals of UNIX (Week6)

The Unix Shell: Expansions & Quoting Demystifying how bash transforms your commands before execution   What is the Shell? The shell is a program, a command interpreter. It reads input from the keyboard (or a file), decides what to do, and runs other programs. Think of it as the wrapper around the operating system’s core…. View Article