Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

AWS Cloud

awk in 4 steps

This revision card explains awk in 4 steps. It starts from the need that print a column. It describes set separator. The how-to section notes filter rows. An example on the card is sum at END.

awk in 4 steps Print a column. Set separator. Filter rows. Sum at END.
awk in 4 steps · Download PNG
Read card text

What this card says

Why do we need it?

Print a column.

awk '{print $1}' f

What is it?

Set separator.

awk -F, '{print $2}' f.csv

How to do it

Filter rows.

awk '$3>100' f

Example

Sum at END.

awk '{s+=$3}END{print s}' f

See all AWS revision cards