Bash Programming – if Else fi

After learning how to read user input on Bash programming, now its time to learn a simple If and else fi.

Example

[codesyntax lang=”bash” lines=”normal” lines_start=”0″ container=”pre”]

[/codesyntax]

The example above will ask for your name. If you type fitri then it will return True and if you enter another word, it will return False. Simply as that :)

Ariel

Leave a Reply

Your email address will not be published. Required fields are marked *