> For the complete documentation index, see [llms.txt](https://book.ice-wzl.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.ice-wzl.xyz/linux/awk.md).

# awk

### Overview

* `awk` is a data driven programming language for processing text based data

### Basics

* Print every line in a file

```
awk '{print}' test.txt
```

* Print the lines which contain the given parameter

```
awk '/item/ {print}' test.txt
```

* Print the first and fourth field with whitespace as the delimeter

```
awk '{print $1,$4}' test.txt 
```

* Display a block of text starting with the word start and stopping with the word stop

```
awk '/start/,/stop/' test.txt
```
