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

Mca Unix

The document contains two parts, each with 5 questions worth 5 marks each. Part A contains questions about regular expressions, shell programs to remove duplicate numbers from an array, check for palindromes, and bubble sort a list of numbers. It also asks about the use of the stat() function. Part B asks about the difference between a process and job, writing a shell script to list files from biggest to smallest size in columns, using more and pipes to display profile and rc files, converting decimal to binary, and validating dates.

Uploaded by

api-3732063
Copyright
© Attribution Non-Commercial (BY-NC)
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)
120 views

Mca Unix

The document contains two parts, each with 5 questions worth 5 marks each. Part A contains questions about regular expressions, shell programs to remove duplicate numbers from an array, check for palindromes, and bubble sort a list of numbers. It also asks about the use of the stat() function. Part B asks about the difference between a process and job, writing a shell script to list files from biggest to smallest size in columns, using more and pipes to display profile and rc files, converting decimal to binary, and validating dates.

Uploaded by

api-3732063
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 1

PART A

EACH QUESTION CARRIES 5 MARKS


Question 1: Write regular expressions for
· A Set of strings including { d, abd, cd, abcd}
· A Set of Strings of x's, y's and z's
For example {xxx, xxy, xxz……….zzz}
Question 2: Write shell program for the following

To remove from an ordered array all numbers that occurs more than once.

Question 3: Write shell program for the following

To check whether a string is palindrome or not.

Question 4: Write shell program for the following

To sort the given list of numbers using bubble sort.

Question 5: What is the use of stat()?

PART B

EACH QUESTION CARRIES 5 MARKS

Question 1: What is difference between Process and a Job ?

Question 2: Write a shell script called bigfile which will change to your home
directory, search and list all your files which are stored in the directory from the
biggest to the smallest in size and displays the output in 8 columns on 78-character
wide lines.

Question 3: Write a shell script, using the more command, and a pipe command to
send the contents of your .profile and .shrc files to display them on the screen.

Question 4: Write a shell program to convert a decimal number to its binary


equivalent.

Question 5: Write a shell program to find the validity of a given date.

You might also like