Biggest of 3 numbers Shell Programming | os | 4th sem cse | operating system lab | QT

Опубликовано: 13 Август 2026
на канале: Quick Through
1,894
32

********** Welcome to Our Youtube Channel *************
operating system laboratory for cse engineering playlist
   • Operating System (OS) Lab Programs In Tami...  

Exp. No. 4 Biggest of 3 numbers 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.

C) Biggest of 3 numbers
Biggest – big3.sh
echo -n "Give value for A B and C: "
read a b c
if [ $a -gt $b -a $a -gt $c ]
then
echo "A is the Biggest number"
elif [ $b -gt $c ]
then
echo "B is the Biggest number"
else
echo "C is the Biggest number"
fi

Output
$ sh big3.sh
Give value for A B and C: 4 3 4
C is the Biggest number