mirror of
https://github.com/trimstray/the-book-of-secret-knowledge
synced 2024-11-26 13:10:18 +00:00
add new one-liner to 'awk' section
- signed-off-by: trimstray <trimstray@gmail.com>
This commit is contained in:
parent
fb158ea7db
commit
46e0cedff6
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue