BASH Guide by DeVeau Joseph

BASH Guide by DeVeau Joseph

Author:DeVeau, Joseph [DeVeau, Joseph]
Language: eng
Format: epub
Publisher: https://sanet.st/blogs/polatebooks/
Published: 2016-05-04T16:00:00+00:00


Here is an example that combines all we have covered about if-else statements.

And its output:

Attention to formatting can greatly reduce headaches when writing conditional blocks! If you find yourself needing more than one or two if statements, you should look into using the case statement.

Case

The keyword, case , is a way to take action depending on the content of a variable without using an unwieldy series of branching if statements. It provides a nice and neat way to match a variable against several possible patterns.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.