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

Ravi Sir's Cards › AWS

AWS Cloud

awk fields

This revision card explains awk fields. It starts from the need that split lines into columns. It describes $1 first, $NF last, -F sets sep. The how-to section notes pattern {action} per line. An example on the card is users and shells.

awk fields Split lines into columns. $1 first, $NF last, -F sets sep. pattern {action} per line. Users and shells.
awk fields · Download PNG
Read card text

What this card says

Why do we need it?

Split lines into columns.

What is it?

$1 first, $NF last, -F sets sep.

How to do it

pattern {action} per line.

Example

Users and shells.

awk -F: '{print $1, $NF}' /etc/passwd

See all AWS revision cards