---
title: "รันคำสั่งเดิมกับ input ที่แตกต่างกัน"
description: "ถ้าคุณต้องรันคำสั่งเดิมซ้ำ ๆ กับ input ที่แตกต่างกัน"
canonical: https://oozou.com/til/run-same-command-on-different-input-inputs-71
locale: th
date: 2020-10-13
topic: shell
---

# รันคำสั่งเดิมกับ input ที่แตกต่างกัน

> ถ้าคุณต้องรันคำสั่งเดิมซ้ำ ๆ กับ input ที่แตกต่างกัน

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

ถ้าคุณต้องรันคำสั่งเดิมซ้ำ ๆ กับ input ที่แตกต่างกัน

ตัวอย่าง input:

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

คำสั่ง:

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

หมายเหตุ: *pbpaste* คือคำสั่ง paste จาก clipboard ของ Mac ซึ่งจะแตกต่างกันไปตามระบบปฏิบัติการ

---

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

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