• Arun Kumar

Shell Script to Check Vowels

Linux script allows the user to use the case command that accepts the input from the user and match the answer. To elaborate this we are asking the question Enter any vowel and the script will accept the answer in both upper case and lower case.

vi vowel_check.sh
# !bin/bash

echo Enter any vowel?
read response
case $response in
A) echo $response is correct ;;
a) echo $response is correct ;;
E) echo $response is correct ;;
e) echo $response is correct ;;
I) echo $response is correct ;;
i) echo $response is correct ;;
O) echo $response is correct ;;
o) echo $response is correct ;;
U) echo $response is correct ;;
u) echo $response is correct ;;
*) echo sorry, that is wrong

Here is the sample output of the above script

More ways to use case

  • You can use the case command to accept the user input and match the case

  • You can ask for user input and evaluate it using case command and returns the response


Recent Posts

See All

Oracle 19c Installation on Linux

Oracle 19c adds more features to Oracle database and this article demonstrates Oracle 19c installation on Linux 7. We will be using Oracle Linux 7 and Oracle Database 19.3 softwares for this activity.

Basic Linux Commands

This article describes basic Linux commands that you must know as a system or database administrator. Below commands in Linux help you manage any Linux server fast and smoothly. Linux Command List Che

Linux Firewall with iptables and firewalld

In this article will be covering details regarding iptables and firewalld which helps in Linux firewall management. We will also be looking at how to enable specific ports (1521 for Oracle) inside ipt