Bash – Case

Switch (Case) Statment in Bash The case statement is useful and processes faster than an else-if ladder. Instead of checking all if-else conditions, the case statement directly select the block to execute based on an input. Create the first program using the case statement in a shell script. The program takes input from the user and executes statements based on the input value.

Save the above script in and execute the script on bash shell. chmod +x ./ Enter your choice [yes/no]:yes Thank you Your type: Yes…

Read More