# pipe output to clipboard with pbcopy and pbpaste

Using terminal and needs to copy the result of command to clipboard ? use pbcopy

```bash
$ cat somefile.txt | pbcopy
```

Or the other way around, paste from clipboard and pipe it to other program

```bash
$ pbpaste | grep foo
```
