---
title: "Discussion on \"shell script If Statement ( If then , If then else, If elif else)\" | Hashnode"
description: "Discussion on \"shell script If Statement ( If then , If then else, If elif else)\". Model 1\n#!/usr/bin/bash\ncount=10 if [ $count -eq 10 ]\nthen\necho \"Condition True\"\nfi\nModel 2\n#!/usr/bin/bash\ncount=10\nif [ $count -ne 0 ]\nthen\necho \"Condition True\" fi\nModel 3\n#!/usr/bin/bash\ncount=10\nif [ $count > 0 ]\nthen\necho \"Condition True\"\nfi\nMo..."
url: "https://hashnode.com/posts/shell-script-if-statement-if-then-if-then-else-if-elif-else/64a42e5a93f28b73278105ca"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [shell script If Statement ( If then , If then else, If elif else)](https://sundarpalanivel.hashnode.dev/shell-script-if-statement-if-then-if-then-else-if-elif-else?utm_source=hashnode&utm_medium=feed)

Model 1 #!/usr/bin/bash count=10 if \[ $count -eq 10 \] then echo "Condition True" fi Model 2 #!/usr/bin/bash count=10 if \[ $count -ne 0 \] then echo "Condition True" fi Model 3 #!/usr/bin/bash count=10 if \[ $count > 0 \] then echo "Condition True" fi Mo...

Jul 4, 2023 · 1 min read · sundarpalanivel.hashnode.dev  
Updated Dec 15, 2023  
Read the article

-   [#shell-script-if-statement-if-then-if-then-else-if-elif-else](https://hashnode.com/tag/shell-script-if-statement-if-then-if-then-else-if-elif-else)

## Written by

[Sundar blog](https://hashnode.com/@sundarvel)

@sundarvel · Chennai

  
[View profile](https://hashnode.com/@sundarvel)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
