Combine filters into a checked summary
See this course’s project requirements
A repeatable Bash workflow with checked registration counts, a controlled rerun and clear handoff instructions.
Keep your working files in your own notebook or software. Save a private description, checklist, and work link in My Proof.
What to include
- Location and path log.
- Raw-row count with header handling.
- Confirmed counts by session.
- Reviewed script and dedicated output path.
- Baseline/variation results and handoff.
Review and revise
Use these criteria to check your work and choose what to improve.
- Paths and quoting are accurate.
- Counts reconcile with the fixture.
- Raw data is preserved.
- Rerun and limitations are explained.
Want more background?
The idea in everyday life
Summarize fictional workshop registrations using Bash and a small tab-separated file.
A pipe sends one command’s output into the next command’s input.
Combine filters into a checked summary — guided practice
Count confirmed registrations by session using a pipeline.
Create an empty shell-lab folder. Inside it create input and output folders. Put registrations.tsv in input with these tab-separated rows and a final newline: session<TAB>status; art<TAB>confirmed; code<TAB>confirmed; art<TAB>waiting; code<TAB>confirmed; music<TAB>confirmed. Start the terminal in shell-lab. Bash required; no sudo, remote systems or deletion commands. Start in shell-lab. The status field contains exactly confirmed or waiting.
1. Remove the header
Run tail -n +2 and inspect the five rows.
tail -n +2 input/registrations.tsvYou should see: Only data rows remain.
The field label must not become a category.
2. Filter status
Add grep with a Bash-quoted tab followed by confirmed and the end-of-line marker.
tail -n +2 input/registrations.tsv | grep $'\tconfirmed$'You should see: Four confirmed rows remain; the waiting row is absent.
Matching the tab plus the final status avoids also matching unconfirmed.
3. Count sessions
Select the first tab-separated field, sort and count adjacent repeated names.
tail -n +2 input/registrations.tsv | grep $'\tconfirmed$' | cut -f1 | sort | uniq -cYou should see: art=1, code=2, music=1.
uniq counts adjacent duplicates, so sorting is necessary.
4. Reconcile
Add the three counts by hand.
You should see: 1+2+1=4, matching the filtered row count.
An independent total catches omissions.
What to finish
A three-category confirmed-count result and total check.
Watch for this
Using uniq -c without sorting can split one category into multiple groups.
How can I tell I understand it?
Complete the changed case, explain your result, and pass the three application checks.
Quick knowledge check
Answer all 3 questions. Get at least 2 right and the lesson completes automatically.
You’ll get an explanation for each answer. Signed in? Your results save to your account.
Pass the check. We’ll save the progress.
Answer all 3 questions above and get at least 2 right. You can review the explanations and try again.
Go to the knowledge checkOptional course overview video · same video as Lesson 1
Lecture 1: Course Overview + The Shell (2020)
From Missing Semester. Watch here or open it on YouTube .
Optional course overview. Follow the written steps below at your own pace.Tools, templates, and lesson sources
Tools and templates
Tools open in a new tab so you can keep your place here.
Sources and further reading
Explore the references behind this lesson.
Source & access notes · checked 2026-09-12
Opened and inspected on 2026-09-12: Sorting, counts, pipes and redirection.
Access: Free public web page; no paid enrollment required.
Reuse: CC BY 4.0 instruction; MIT examples. Independent fixture used.
Report a problem with this lesson
Tell us what went wrong. Please leave out personal information and private project contents.