Saturday, January 9, 2010

Unix Shell Programs

Unix ( Shell Programs )

1. A) Write a shell script to perform integer arithmetic operations.

B) Write a shell script to perform floating point arithmetic operations.

2. Write a shell script to display first 10 natural numbers.

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

4. Write a shell script to find out whether the given number is prime number or not.

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

6. Write a shell script that takes a command line argument and reports on whether it is directory, a file, or something else.

7. Write a shell script that computes the gross salary of a employee according to the following rules:
i) If basic salary is <1500 then HRA=10% of the basic and DA=90% of the basic.
ii) If the basic salary is >=1500 then HRA= Rs500 and DA=98% of the basic
The basic salary is entered interactively through the key board.

8. Write a shell script that displays a list of all the files in the current directory to which the user has read, write and execute permissions.

9. Develop an interactive script that asks for a word and a file name and then tells how many times that word occurred in the file.

10. Write a shell script that takes a login name a s command-line argument and reports when that person logs in

11. Write a shell script which receives two file names a s arguments. It should check whether the two file contents are same or not. If they are same then second file should be deleted.

12. Write an interactive file-handling shell program. Let it offer the user the choice of copying, removing, renaming, or linking files. Once the user has made a choice, have the program ask the user for the necessary information, such as the file name and so on.

13. Write a shell script to search for particular element from an array of elements.

14. Write a shell script to accept a string in the command line and reverse the same string.

15. Write a shell script to find out whether the given string is Palindrome or not

Download All Programs By Following Link:

http://www.ziddu.com/download/8087687/Unix.doc.html

No comments:

Post a Comment

  © For Movies Click Here Softwares by For Games Click Here 2010

Back to TOP