---
title: "Run same command on different input/inputs"
description: "If you have to run the same command repetitively over different input/inputs."
canonical: https://oozou.com/til/run-same-command-on-different-input-inputs-71
locale: en
date: 2020-10-13
topic: shell
---

# Run same command on different input/inputs

> If you have to run the same command repetitively over different input/inputs.

Published: 2020-10-13 · Topic: [shell](https://oozou.com/til-topics/shell) ([markdown](https://oozou.com/til-topics/shell.md))

If you have to run the same command repetitively over different input/inputs.

Example input:

```
c595270372e3
c04094382ae1
498a6505a1f7
4ac0e1872789
170a7f2ec51a
930743cb4e19
```

Command:

```
pbpaste | xargs -I id docker image rm id
```

Note: *pbpaste* is clipboard paste command for Mac, would be different for operating systems.

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
