---
title: "التحقق من وجود أمر باستخدام سكربت shell"
description: "التحقق من وجود أمر باستخدام سكربت shell"
canonical: https://oozou.com/til/check-if-command-exists-with-shell-script-52
locale: ar
date: 2020-10-13
topic: shell
---

# التحقق من وجود أمر باستخدام سكربت shell

> التحقق من وجود أمر باستخدام سكربت shell

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

```bash
if ! type gem > /dev/null; then
  echo 'gem command not found.'
fi
```

---

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

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