0% found this document useful (0 votes)
3 views3 pages

Lab Assignment-2 - DOS (CSE4049) - 231011 - 100406 - Programming

The document outlines Laboratory Assignment 2 for a course on Operating Systems, focusing on Unix commands and shell programming. It includes objectives and seven specific tasks requiring the creation of executable shell scripts for file manipulation, system information display, and command line argument handling. Each task emphasizes practical application of shell scripting concepts.

Uploaded by

mardiblbiswajit
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)
3 views3 pages

Lab Assignment-2 - DOS (CSE4049) - 231011 - 100406 - Programming

The document outlines Laboratory Assignment 2 for a course on Operating Systems, focusing on Unix commands and shell programming. It includes objectives and seven specific tasks requiring the creation of executable shell scripts for file manipulation, system information display, and command line argument handling. Each task emphasizes practical application of shell scripting concepts.

Uploaded by

mardiblbiswajit
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/ 3

Laboratory Assignment 2

Subject: Design of Operating Systems


Subject code: CSE 4049

Assignment 2: Familiarization with basic Commands in Unix Operating


System and Shell Programming

Objective of this Assignment:


 To learn basic concepts of shell programming
 To lean concept of command line argument in shell script.

1. Write a shell script named as prog for merge the content of files a.txt, b.txt, and c.txt
sort them and save the result in a file called result and display the sorted output on the
screen.
(Note: a.txt, b.txt and c.txt file contain some numerical value. Make the script an
executable file and run it as a command using its name only.)

2. Write a shell script named as systeminfo that will display the information about the login
name of the user, name of the Unix system used by the user, type of the SHELL, Path of
current working directory of the user and list of file contain in current working directory.
(Make the script an executable file and run it as a command using its name only.)

3. Write a shell script named as dtcal for displaying both the system date and calendar for
specific month, say march 2022, in the given format:-
Date : specific date
Calender : current calendar
(Make the script an executable file and run it as a command using its name only.)
4. Write a shell script named as nvwc which will display the filename and linecount,
wordcount and char count of the file dtcal in the following format:
Filename: dtcal
Line count: -
Word count: -
Charcout: -
(Make the script an executable file and run it as a command using its name only.)
5. Write a shell script named as nvwc2 which will display the filename and linecount, word
count and char count of any file given as argument to nvwc2 in the following format:
filename linecount wordcount charcount
file1 - - -
(Make the script an executable file and run it as a command using its name only.)

6. Write a shell script named as darg to display the total number of command line
arguments along with the first two arguments.
-Modify the script to display all the arguments.
(Make the script an executable file and run it as a command using its name only.)

7. Write a shell script named as ndisp that will take three command line arguments
specifying the value of n, m and a filename and display the first n number of lines and
last m number of lines of the file given as argument.
(Make the script an executable file and run it as a command using its name only.)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy