Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Ui22cs57 lab11 tejkumar

LAB-11

Aim:Practice Shell Scripting with some pre-executed programs.

SHELL SCRIPTING:

A shell is a special user program that provides an interface for the user to use operating
system services. Shell accepts human-readable commands from users and converts them
into something which the kernel can understand.

Shell is broadly classified into two categories –

● Command Line Shell


● Graphical shell

TERMINAL:- A program which is responsible for providing an interface to a user so that he/she
can access the shell.

As a shell can also take commands as input from a file, we can write these commands in a file and can
execute them in the shell to avoid this repetitive work. These files are called Shell Scripts

1. WRITING A SAMPLE SHELL COMMAND TO ECHO i.e DISPLAY TEXT AND USING THE
LS COMMAND:-

55
TEJKUMAR | [SCHOOL]
Ui22cs57 lab11 tejkumar

2. COMMENTS IN SHELL SCRIPT

3.IMPLEMENTATION IF WHILE LOOP IN SHELL

56
TEJKUMAR | [SCHOOL]
Ui22cs57 lab11 tejkumar

4.COMPARING STRINGS

57
TEJKUMAR | [SCHOOL]

You might also like