Vowel or Consonant Shell Programming | os | 4th sem cse | operating system lab | QT

Опубликовано: 05 Ноябрь 2024
на канале: Quick Through
525
8

********** Welcome to Our Youtube Channel *************
operating system laboratory for cse engineering playlist
   • Operating System  

Exp. No. 4 Vowel or Consonant Shell Programming

Aim
To write simple shell scripts using shell programming fundamentals.
The activities of a shell are not restricted to command interpretation alone. The shell
also has rudimentary programming features. Shell programs are stored in a file (with
extension .sh). Shell programs run in interpretive mode. The original UNIX came with the
Bourne shell (sh) and it is universal even today. C shell (csh) and Korn shell (ksh) are also
widely used. Linux offers Bash shell (bash) as a superior alternative to Bourne shell.

E) Vowel or Consonant
Vowel - vowel.sh
echo -n "Key in a lower case character : "
read choice
case $choice in
a|e|i|o|u) echo "It's a Vowel";;
*) echo "It's a Consonant"
esac

Output
$ sh vowel.
Key in a lower case character : e
It's a Vowel