Linux Shell Scripting (BCAICT202) Assignment 1

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Linux Shell Scripting (BCAICT202)

Assignment 1:
1. Mention the different permissions associated with a file. How can a user know the permissions
of a file?
2. Translate the following permissions to octal code
i. rwxr-x—x
ii. r-xr-xr-x
iii. –xrwx—x
3. Distinguish between an editor and a word processor.
Assignment 2:
Selective UT-1 questions
1. Write a shell script to find the greatest of 3 input numbers.
2. Explain the concept of absolute and relative paths.

Write the relative paths from:


a. CS241 to report
b. hopper to report
3. Write the syntax for conditional statement (if…else.. fi etc.) and looping constructs (for, while)
in shell scripting.
Assignment 3:
1. Give a list of different options that are generally used with the ps command and clearly
mention under what situations these options are used.
2. Write about memory layout in a UNIX based systems.
Assignment 4:
1. Write a shell script that counts the number of directories under the current directory.
2. Write a shell script to compute the sum of numbers passed to it as arguments on the command
line and displays the result.
3. Write a shell script to find the smallest of three numbers that are read from the keyboard.

You might also like