Tuesday 22 November 2016

Unix Command Question

1.Create a file called my file using cat command and data on it 





2. create a file  newfle in vi editor & edit the content the file and save it.



3 Sort the content of the file according to the first field of the file.



4.Use of redirection operator(input output append)

Input operator





Output operator

Append operator













5.Use of cut command and save the user list in the u list file.
 



6.Use the pipeline to display the content of file 1 and file 2 to file 3



7. Use the pipeline to display the output of who command on screen with total no of user logged in.




8.Write a program to calculate the area and perimeter of rectangle by providing length and breadth by user.
 



9.Write a program to calculate area of circle by providing radius of a circle.




10.Write a program to calculate gross salary of an employee if basic salary is provided through keyboard
(HRA=20%,DA=40%,GROSS SALARY=BS+HRA+DA)



11.Write a program to take number between 1 to 10 by user if it is less than 5 than 10 should be added otherwise 5 should be subtracted and display on the screen.
 

12.Write a program to check weather it is a file or directory or anything else.



13. Write a program to check a write permission on a file if it is given then write a content and save on it.
 



14.Write a program to check weather it is a number or character or some symbol.













No comments:

Post a Comment