Javatpoint Logo
Javatpoint Logo

Shell Scripting if then elif

A new if can be nested inside an elif.

Syntax:

Syntax of if then elif is shown in the snapshot below,

Shell scripting If then elif 1

Example if then elif:

We have shown the example of choosing color.

Condition:

Shell scripting If then elif 2

Look at the above snapshot, we have shown the script.

Shell scripting If then elif 3

Look at the above snapshot, on Red color it goes to if part, on Blue color it goes to elif part and on other colors it goes to else part.

Next Topicfor loop





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA