Question 1:
Write the UNIX commands for the following:
(a) To wait for a specified number of seconds before exit.
(b) To arrange to print a file on the line printer without making
you wait for the command to finish.
(c) What are the differences among the following three commands?
i. cat file | pr
ii. pr < file
iii. pr file
(d) To change the command prompt from $ to !.
(e) To grant the permissions of read, write and execute to the user
and read only to the group and others for any file using chmod.
(f) To direct a standard output to any file.
(g) To print all the filenames in the current directory that doesn’t
contain the temp.
(h) To list all the filenames that others can read and write.
(i) To split a file test, which is containing 100 lines into 25 lines
each.
(j) To display those lines that are common to file1 and file2.
Question 2:
(a) Write a shell program to translate all the upper case letters in any text file to the lower case letters.
(b) Given the filename by the user as the input, write a shell script to display the last five lines of the file.
(c) Write a shell script to display the list of the files whose filename consists of 7 characters (with any file extension) and filename starts with the alphabet a.
PART-II: MCS-043
Question 1:
Design a database for maintaining inventory of a retail shop. You
are required to perform the following activities for the maintenance
of the above:
(a) Create the database.
(b) Write the following queries using SQL:
(i) Find the details of the items whose sales have exceeded Rs. 1
Lakh.
(ii) Find the details of the six items in terms of numbers/quantity
in alphabetical order that have got the maximum sale.
(iii) Find the names of those items that have an overall sale of 60%
of what have been procured.
(iv) Create a view of the items for the manager showing overall performance
of the week for each item.
(c) Create the procedures for the queries (i) to (iii) above.
(d) Perform the following activities:
(i) Create a trigger that prints the daily catalog on change of a
price of an item.
