$
Linux Practice
Practice
Tutorials
English
한국어
日本語
中文
terminal
Welcome to Linux Practice Terminal!
Type "help" to see available commands.
user
@linux:
~
$
Text Processing Pipeline
Reset Lesson
Build powerful text processing pipelines combining sed, awk, tr, grep, and sort.
Step 1
Start by converting CSV to a readable table format using sed to replace commas with pipes.
Type: cat documents/sales.csv | sed 's/,/ | /g'
cat documents/sales.csv | sed 's/,/ | /g'
Step 2
Extract unique product names from sales.csv (skip header) using awk, sort, and uniq.
Step 3
Find the most-accessed URLs: grep GET requests, extract URLs with awk, count occurrences, sort by count.
Step 4
Count the number of ERROR entries in the access log using grep and wc.
Step 5
Normalize names to uppercase, then sort and deduplicate using tr, sort, and uniq.
Step 6
Find the top 3 products by revenue: extract product and revenue with awk, sort numerically, take top 3.