> For the complete documentation index, see [llms.txt](https://mikefarah.gitbook.io/yq/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mikefarah.gitbook.io/yq/operators/pipe.md).

# Pipe

Pipe the results of an expression into another. Like the bash operator.

## Simple Pipe

Given a sample.yml file of:

```yaml
a:
  b: cat
```

then

```bash
yq '.a | .b' sample.yml
```

will output

```yaml
cat
```

## Multiple updates

Given a sample.yml file of:

```yaml
a: cow
b: sheep
c: same
```

then

```bash
yq '.a = "cat" | .b = "dog"' sample.yml
```

will output

```yaml
a: cat
b: dog
c: same
```
