AWK: Difference between revisions

Content added Content deleted
Line 5: Line 5:
= Basics =
= Basics =


*Awk is a scripting language used for manipulating data and generating reports.T
*Awk is a scripting language used for manipulating data and generating reports.
* Field variables — $1, $2, $3,

* $0 is the entire line.
*Usage:
*Usage:
cat stats_collection.log | grep svmem | awk '{print $1 $2," - ",$7}'
cat stats_collection.log | grep svmem | awk '{print $1 $2," - ",$7}'



= Built In Variables =
= Built In Variables =