Skip to content

A collection of inspiring lists, manuals, cheatsheets, blogs, hacks, one-liners, cli/web tools and more.

add new one-liner to 'awk' section - signed-off-by: trimstray <[email protected]>

trimstray46e0cedff687
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