Ravi Sir's Cards › AWS
awk vs cut
This comparison card contrasts awk and cut. awk is described as mini language for columns. cut is described as simple column cutter. The card pairs awk with logs and reports, and cut with clean delimited files.
Read card text
What this card says
Text
awk
Mini language for columns.
cut
Simple column cutter.
Key points
Handles spaces and logic.
One fixed separator.
Example
awk '{print $1}' log
Use when
Logs and reports.
Clean delimited files.