100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
College aantekeningen

Unix Shell Scripts in Operating systems

Beoordeling
-
Verkocht
-
Pagina's
15
Geüpload op
30-12-2022
Geschreven in
2021/2022

In these notes, Covered all the topics of operating systems briefly. COs - Analyze the structure of OS and basic architectural components involved in OS design. Compare and contrast various CPU scheduling algorithms. Evaluate the requirements for the process synchronization and co-ordination in the contemporary operating system. Analyze various algorithms for memory management, I/O management and security aspects of operating system. Write shell scripts in Unix/Linux O.S and write simple programs using kernel system calls. Also understand virtualization concept

Meer zien Lees minder
Instelling
Vak









Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
30 december 2022
Aantal pagina's
15
Geschreven in
2021/2022
Type
College aantekeningen
Docent(en)
Ymk sir
Bevat
Alle colleges

Onderwerpen

Voorbeeld van de inhoud

Unix Shell Scripts
1) Write a shell script to scans the name of the command and executes it.
Program :-
echo "enter command name"
read cmd
$cmd

Output :-
enter command name
cal
February 2016
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29

2) Write a shell script Which works like calculator and performs below operations Addition
, Subtract ,Division ,Multiplication
Program :-
i) using if..elif statement
echo " Enter one no."
read n1
echo "Enter second no."
read n2

echo "1.Addition"
echo "2.Subtraction"
echo "3.Multiplication"
echo "4.Division"
echo "Enter your choice"
read ch
if [ $ch = "1" ]
then
sum=`expr $n1 + $n2`
echo "Sum ="$sum
elif [ $ch = "2" ]
then
sum=`expr $n1 - $n2`
echo "Sub = "$sum
elif [ $ch = "3" ]
then

1

, Unix Shell Scripts
sum=`expr $n1 \* $n2`
echo "Mul = "$sum
elif [ $ch = "4" ]
then
sum=`expr $n1 / $n2`
echo "Div = "$sum
fi

Output :-
Enter one no.
32
Enter second no.
12
1.Addition
2.Subtraction
3.Multiplication
4.Division
Enter your choice
2
Sub = 20

ii) using while loop and switch statement
i="y"
while [ $i = "y" ]
do
echo " Enter one no."
read n1
echo "Enter second no."
read n2
echo "1.Addition"
echo "2.Subtraction"
echo "3.Multiplication"
echo "4.Division"
echo "Enter your choice"
read ch
case $ch in
1) sum=`expr $n1 + $n2`
echo "Sum ="$sum;;
2)sum=`expr $n1 - $n2`
echo "Sub = "$sum;;
3)sum=`expr $n1 \* $n2`

2
$4.29
Krijg toegang tot het volledige document:

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten

Maak kennis met de verkoper
Seller avatar
vaibhav51ppsv2020

Ook beschikbaar in voordeelbundel

Maak kennis met de verkoper

Seller avatar
vaibhav51ppsv2020 C.K.Pithawala school of engineering and techonology
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
0
Lid sinds
2 jaar
Aantal volgers
0
Documenten
14
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen