From 46e0cedff6878586beda7deba3fb1872fc653a4c Mon Sep 17 00:00:00 2001 From: trimstray Date: Mon, 13 May 2019 13:21:39 +0200 Subject: [PATCH] add new one-liner to 'awk' section - signed-off-by: trimstray --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 1ea359a..344ee46 100644 --- a/README.md +++ b/README.md @@ -3259,6 +3259,15 @@ awk '!x[$0]++' filename awk '{print $NF}' filename ``` +###### Remove empty lines + +```bash +awk 'NF > 0' filename + +# alternative: +awk NF filename +``` + ###### Print multiple columns with separators ```bash