Korn Shell Case Statement. Select allow the user to select one of a list of possibilities from. You might find yourself generating a series of if/elif/elif/elif/else syntax and wondering whether a better way of handling a multiway test exists.


Korn Shell Case Statement

Once the case statement is finished, the if checks to see if a valid. 14.5k 26 26 gold badges 45 45 silver badges.

A Case Statement Must Start With The Case Keyword And End With The Esac Keyword.

Its command language is a superset of the sh (1) shell language.

We Use The Value Of Reply As The Case Selector.

Conditional expressions for the korn shell or posix shell.

Although Its Syntax Is Nowhere Near As Elegant Or Consistent As.

Images References :

Pass Values To Case Statement In A Function Korn Shell.

The snoopy example below was written with if/then/elif/else statement.

Select Allow The User To Select One Of A List Of Possibilities From.

$ cat snoopy2.ksh #!/bin/ksh # script.

Although Its Syntax Is Nowhere Near As Elegant Or Consistent As.