diff --git a/pages/common/awk.md b/pages/common/awk.md index 69e75b527..2bb17b8aa 100644 --- a/pages/common/awk.md +++ b/pages/common/awk.md @@ -6,6 +6,10 @@ `awk '{print $5}' {{filename}}` +- Print the second column of the lines containing "something" in a space separated file: + +`awk '/{{something}}/ {print $2}' {{filename}}` + - Print the third column in a comma separated file: `awk -F ',' '{print $3}' {{filename}}`