0% found this document useful (0 votes)
8 views2 pages

Unix 32 Questions

The document outlines a series of programming tasks for a Unix and R programming lab. It provides 32 tasks for writing Unix programs that perform functions like displaying text, getting system information, arithmetic operations, file operations, checking types of numbers, and more.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Unix 32 Questions

The document outlines a series of programming tasks for a Unix and R programming lab. It provides 32 tasks for writing Unix programs that perform functions like displaying text, getting system information, arithmetic operations, file operations, checking types of numbers, and more.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

DEPARTMENT OF COMPUTER SCIENCE

UNIX AND R PROGRAMMING LAB CP21/6C/PR6

1. Write a Unix Program to display “shell scripting”.


2. Write a Unix Program to get current date, time, user name and current working directory.
3. Write a Unix Program to perform arithmetic operation with numbers(input as command
Line Argument)
4. Write a Unix Program to display list of users currently logged in.
5. Write a Unix Program to check whether the given number is even or odd.
6. Write a Unix Program to check whether given file is a directory or not.
7. Write a Unix Program to count number of files in a Directory.
8. Write a Unix Program to copy contents of one file to another
9. Write a Unix Program to Create directory, write contents on that and Copy to a suitable
location in the home directory
10. Write a Unix Program to find the number of words character, words and lines in a file.
11. Write a Unix Program to display list of files in the directory.
12. Write a Unix Program to remove duplicate lines in a file.
13. Write a Unix Program to find the greater of two numbers.
14. Write a Unix Program to find whether the given number is prime or not.
15. Write a Unix Program to swap two numbers.
16. Write a Unix Program to find whether the given number is positive, negative or zero.
17. Write a Unix Program to find the factorial of a given number.
18. Write a Unix Program to find the greatest of three numbers.
19. Write a Unix Program to find the area of given shapes.
20. Write a Unix Program to find whether the given year is a leap year or not.
21. Write a Unix Program to reverse the given number.
22. Write a Unix Program to generate the Fibonacci series.
23. Write a Unix Program to sort the lines in a file.
24. Write a Unix Program to sort and remove duplicate lines in a file.
25. Write a Unix Program to create directory write contents on that and move to a suitable
location in the home directory.
26. Using Unix commands create a directory in the home directory. Create content for the
directory (file and subdirectory). Remove all the file, subdirectory and directory.
27. Display calendar with different options.
28. Perform different arithmetic operations using bc command.
29. Write a Unix program to reverse a string.
30. Write a Unix program to find the smallest of three numbers.
31. Write a Unix program to convert Fahrenheit to Celsius.
32. Write a Unix program to calculate the simple interest.

You might also like