Recap - Data Pipeline
Part of the Fundamentals section of Coddy's Terminal journey — lesson 47 of 82.
Challenge
EasyThe file sales.txt contains product sales records in the format category:item:price. Build a complete data pipeline to find how many unique products were sold in the electronics category.
Run a single command that:
- Uses
catto readsales.txt - Pipes to
grepto filter only lines containingelectronics - Pipes to
sortto arrange the entries - Pipes to
uniqto remove duplicates - Pipes to
wc -lto count the unique electronics products
Hint: This pipeline combines everything you've learned: filtering with
grep, preparing data withsort, removing duplicates withuniq, and counting withwc -l. Chain all five commands using the|symbol.
Try it yourself
All lessons in Fundamentals
4Directories
Create A DirectoryCopy A DirectoryMove And Rename A DirectoryDelete A DirectoryRecap - Directory Operations7File Content
Head And TailWord CountSort CommandUnique CommandGrep BasicsGrep With FlagsRecap - Text Detective2Navigation
Print Working DirectoryList FilesChange DirectoryAbsolute vs Relative PathsHome And Root DirectoryRecap - Find Your Way8Redirection
Standard OutputOverwrite To A FileAppend To A FileStandard InputStandard ErrorRecap - Log Builder6Wildcards And Patterns
The Star WildcardThe Question Mark WildcardBracket WildcardsCombining WildcardsRecap - Selective Operations9Piping
What Is A PipeChaining Two CommandsChaining Multiple CommandsPipe With GrepRecap - Data Pipeline