Laab 2
Laab 2
Lab #02
Spring 2022
SHELL Programming (Part I)
Submitted by: Waqas Atta
Registration number: 22PWCSE2142
Class Section: B
“On my honor, as student of University of Engineering and Technology, I have neither given nor
received unauthorized assistance on this academic work.”
Submitted to:
Engr. Abdullah
March 15th, 2023
The aim of this laboratory is to learn and practice SHELL scripts by writing small SHELL
programs.
The following are the primary objectives of this lab session:
A shell is a command line interpreter. It takes commands and executes them. As such, it
implements a programming language. Three most widely used shells in UNIX are Bourne
shell, C shell, and Korn shell.
Shell scripts:
A shell script or a shell program is a series of commands put in a file and executed by the
Shell. We will use shell to create shell scripts.
Save the file and type the file name in command line and the file is executed as follows.
Figure 1: Terminal
This prompts the user for input, assigns this to the variable name and then displays the
Figure 3: Terminal
Figure 4: script file
Figure 7: Terminal
Figure 8: Script file
sum is 12 + 90
Figure 9: terminal
Figure 10: Script
CSE 302L: Operating Systems Lab
Includes name,
date, and
assignment title. No name, date, or
Includes name, date,
Task titles, assignment title
and assignment title.
objectives, output included.
4. Presentation Task titles, objectives,
screenshots No task titles, no
of document output screenshots
included and good objectives, no output
included and good
formatting and screenshots, poor
formatting.
excellently formatting.
organized.
Instructor: