0% found this document useful (0 votes)
105 views

AR20 2-1 FOSS Lab Syllabus

The document describes the FOSS Lab course for the B.Tech program at Raghu Engineering College. The course objectives are to familiarize students with Linux, commands, shell scripting, and awk scripting. The document outlines 10 lab experiments involving writing shell and awk scripts to perform tasks like mathematical operations, string manipulation, file handling, sorting, searching, and text processing. Students will be assessed based on internal exams worth 15 marks and an external exam worth 35 marks.

Uploaded by

Ravi Varma D V S
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)
105 views

AR20 2-1 FOSS Lab Syllabus

The document describes the FOSS Lab course for the B.Tech program at Raghu Engineering College. The course objectives are to familiarize students with Linux, commands, shell scripting, and awk scripting. The document outlines 10 lab experiments involving writing shell and awk scripts to perform tasks like mathematical operations, string manipulation, file handling, sorting, searching, and text processing. Students will be assessed based on internal exams worth 15 marks and an external exam worth 35 marks.

Uploaded by

Ravi Varma D V S
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/ 2

RAGHU ENGINEERING COLLEGE

(Autonomous)
(Approved by AICTE, New Delhi, Permanently Affiliated to JNTU Kakinada,
Accredited by NBA & Accredited by NAAC with A grade)

FOSS Lab
AR20 - B. Tech. (Common to CSE & All Specializations)
II - B. Tech., I-Semester

L T P C
0 0 3 1.5

Course Code: Internal Exams: 15


External Exams: 35
Course Objectives:
The course objectives of FOSS Lab are to discuss and make student familiar with the
 To learn about the significance of FOSS.
 To be familiarized the basic commands in Linux.
 To be familiarized with Linux Operating system.
 To be familiarized with shell scripting.

Course Outcomes:
By the end of the course, the student will:
 Identify and apply various Linux commands.
 Create a new file from scratch or edit an existing file using vi editor.
 Develop shell scripts for specific needs.
 Develop awk scripts for specific needs.

LAB EXPERIMENTS

1. Study of Unix/Linux command list:


cd, cal,cat, banner, touch, man,who,cat, cd, cp,MV, ls, mv, rm, mkdir, rmdir, echo, more,
date, history, chmod, pwd, cal,wc, sort, cut,paste, logout, shutdown.
2. Demonstration of VI editor
Session-1
a) Use vi editor to create a file called myfile.txt which contains some text.
b) Correct typing errors during creation.
c) Save the file
d) Logout of the system
Session-2
a) Log into the system
b) Open the file created in session 1
c) Add some text
d) Change some text
e) Delete some text
f) Save the Changes
g) Logout of the system
3. a) Write a shell script to generate the mathematical tables.
b) Write a shell script to find the factorial of a given number.
c) Write a shell script that computes the gross salary of a employee according to the
following rules:
i) If basic salary is < 1500 then HRA =10% of the basic and DA =90% of the basic.
ii) If basic salary is >=1500 then HRA =Rs500 and DA=98% of the basic

4. a) Write a shell script (small calculator) that adds, subtracts, multiplies and divides the two
given numbers. There are two division options: one returns the quotient and the other
remainder. The script requires three arguments: the operation to be used and the two
integers. The operation is specified by options:
Add -a
Subtract-s
Multiply -m
Quotient -c
Remainder –r
b) Write a shell script to accept student number, name, and marks in five subjects. Find total,
average and grade.
Rules:
Avg>=80 then grade A
Avg<80&&Avg>=70 then grade B
Avg<70&&Avg>=60 then grade C
Avg<60&&Avg>=50 then grade D
Avg<50&&Avg>=40 then grade E
Else grade F
c) Write a shell script to find the GCD of two given numbers.

5. a) Write a shell script to display string palindrome from given arguments.


b) Write a shell script which will display Armstrong numbers from given arguments.
c) Write a shell script to display reverse numbers from given argument list.

6. a) Write a shell script to find largest element in a array


b) Write a shell script to determine whether a given number is a prime number or not.
c) Write a shell script to generate a Floyd triangle for a given value.

7. a) Write a shell script to print all the primes below a given number is a prime number.
b) Write a shell script to print the first ‘n’ Fibonacci numbers.
c) Write a shell script which displays the list of all files in a given directory.

8. a) Write a shell script to sort elements of given array by using selection sort.
b) Write a shell script to search given number using binary search.

9. a) Write a sed command that deletes the first character in each line in a file.
b) Write a sed command that deletes the character before the last character in each line in a
file.
c) Write a sed command that swaps the first and second words in each line in a file.

10. a) Write an awk program to print sum, avg of students marks list
b) Write an awk program to display students pass/fail report.
c) Write an awk program to count the no. of vowels in a given file.

You might also like