0% found this document useful (0 votes)
64 views20 pages

LSS Notes

This lab report details the experiments conducted in Linux Shell Scripting as part of the Electrical and Electronics Engineering curriculum for the academic year 2024-2025. It includes a list of programs that cover various Unix commands and shell script development tasks. The report certifies the authenticity of the work and includes a structured outline of the experiments performed.

Uploaded by

ch.priyabharathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views20 pages

LSS Notes

This lab report details the experiments conducted in Linux Shell Scripting as part of the Electrical and Electronics Engineering curriculum for the academic year 2024-2025. It includes a list of programs that cover various Unix commands and shell script development tasks. The report certifies the authenticity of the work and includes a structured outline of the experiments performed.

Uploaded by

ch.priyabharathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

LAB REPORT ON

“LINUX SHELL SCRIPTING”

DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING

SRI VASAVI ENGINEERING COLLEGE (AUTONOMOUS)


(Sponsored by Sri Vasavi Educational Society)
(Approved by AICTE, New Delhi and Permanently Affiliated to JNTUK, Kakinada)
(Accredited by NBA & NAAC with ‘A’ Grade)
Pedatadepalli, TADEPALLIGUDEM, W.G. Dist., A.P– 534 101

Academic Year: 2024 – 2025


i
SRI VASAVI ENGINEERING COLLEGE (AUTONOMOUS)
(Sponsored by Sri Vasavi Educational Society)
(Approved by AICTE, New Delhi and Permanently Affiliated to JNTUK, Kakinada)
(Accredited by NBA & NAAC with ‘A’ Grade)
Pedatadepalli, TADEPALLIGUDEM, W.G. Dist., A.P– 534 101

DEPARTMENT OF
ELECTRICAL & ELECTRONICS ENGINEERING

CERTIFICATE

This is to certify that the lab report entitled “Linux Shell Scripting Lab” is a
bonafide Work done by submitted in partial
fulfillment of the requirements for the award of the Degree in Electrical and
Electronics Engineering during the academic year 2024-2025. The results of
investigation enclosed in this report have been verified and found satisfactory.

Faculty Incharge of the Laboratory Head of the Department

External Examiner

ii
List of Experiments

SI.NO Name of the Program Pg.No.


1. Experiment the following Unix Commands: 01-07
a) General Purpose Utilities: cal, date,man,who.
b) Directory Handling Commands: pwd,cd,mkdir,rmdir.
c) File Handling Utilities: cat,cp,ls,rm,nl,wc
d) Displaying Commands: head, tail
e) Filters: cmp,comm.,diff,sort,uniq
f) Disk Utilities: du,df

2. Develop a Shell Program to Display all the words which 8


are entered as command line arguments.
3. Develop a shell script that Changes Permissions of files in 9
PWD as rwx for users.
4. Develop a shell script to print the list of all sub directories 10
in the current directory.
5. Develop a Shell Program which receives any year from the 11
keyboard and determines whether the year is leap year or
not. If no argument is supplied the current year should be
assumed.
6. Develop a shell script which takes two file names as 12
arguments-If their contents are same then delete the second
file.
7. Develop a shell script to print the given number in the 13
reversed order.
8. Develop a shell script to print first 25 Fibbonacci numbers. 14
9. Develop a shell script to print the Prime numbers between 15
the specified range.
10. Develop a shell script to delete all lines containing the word 16
‘unix’ in the files supplied as arguments.
11. Develop a shell script Menu driven program which has the following 17
options.
i) contents of /etc/passwd
ii) list of users who have currently logged in.
iii) present working directory.
iv) exit.
Program 1
1. Calendar:

1
2. DATE

3. man cal:

4. man man:

2
7. PWD:

6. mkdir:

7. ls:

3
8. ls -l:

9. rm:

10. nl, wc:

11. head and tail:

4
12. cmp:

13. comm and diff:

5
14. sort:

15. uniq:

16. du:

6
17. df:

7
Program 2

Aim: Develop a Shell Program to Display all the words which are entered as command
line arguments.

Output:

8
Program 3
Aim: Develop a shell script that Changes Permissions of files in PWD as rwx for users.

Output:

9
Program 4
Aim: Develop a shell script to print the list of all sub directories in the current directory.

1. List sub directories:

Output:

2. List directories:

Output:

10
Program 5
Aim: Develop a Shell Program which receives any year from the keyboard and
determines whether the year is leap year or not. If no argument is supplied the current
year should be assumed.

Output:

11
Program-6:
P

Program
Aim: Develop a shell script which takes - 6 as arguments-If their contents are
two file names
same then delete the second file.

Output:

12
Program -7
Aim: Develop a shell script to print the given number in the reversed order.

Output:

13
Program 8
Aim: Develop a shell script to print first 25 Fibonacci numbers.

Output:

14
Program 9
Aim: Develop a shell script to print the Prime numbers between the specified range.

Output:

15
Program 10
Aim: Develop a shell script to delete all lines containing the word ‘unix’ in the files
supplied as arguments.

Output:

16
Program 11
Aim: Develop a shell script Menu driven program which has the following options.

i) contents of /etc/passwd
ii) list of users who have currently logged in.
iii) present working directory.
iv) exit.

Output:

17

You might also like