Practical: Unix Programming Lab

 Practical: Unix Programming Lab


1.   Write a shell script to check if the number entered at the command line is prime or not.

2.   Write a shell script to modify “cal” command to display calendars of the specified months.

3. Write a shell script to modify “cal” command to display calendars of the specified range of months.

4. Write a shell script to accept a login name. If not a valid login name display message “Entered login name is invalid”.

5.   Write a shell script to display date in the mm/dd/yy format.

6.   Write a shell script to display on the screen sorted output of “who” command along with the total number of users.

7.   Write a shell script to display the multiplication table of any number.

8.    Write a shell script to compare two files and if found equal asks the user to delete the duplicate file.

9.   Write a shell script to find the sum of digits of a given number.

10.    Write a shell script to merge the contents of three files, sort the contents and then display them page by page.

11.   Write a shell script to find the LCD (least common divisor) of two numbers.

12.   Write a shell script to perform the tasks of basic calculator.

13.   Write a shell script to find the power of a given number.

14.   Write a shell script to find the greatest number among the three numbers.

15.   Write a shell script to find the factorial of a given number.

16.   Write a shell script to check whether the number is Armstrong or not.