0% found this document useful (0 votes)
56 views4 pages

Unix Shell Scripting Assignment

The document outlines 7 objectives for writing shell scripts to perform tasks like merging files, displaying system information, calendars, and file properties. The objectives involve writing scripts that take arguments and display output in specified formats.
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)
56 views4 pages

Unix Shell Scripting Assignment

The document outlines 7 objectives for writing shell scripts to perform tasks like merging files, displaying system information, calendars, and file properties. The objectives involve writing scripts that take arguments and display output in specified formats.
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/ 4

Design of operating system

Assignment 2: Familiarization with basic Commands in Unix Operating


System and Shell Programming
Objective 1:
Write a shell script named as prog for merging 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.)

Objective 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.)

Objective 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.)

Objective 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.)

Objective 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 file1 -
wordcount - charcount - (Make the script an executable file and run it as a
command using its name only.)

Objective 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.)
Objective 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