Write a program which take string from user and you have to do following tasks with the string:
1. Reverse
2. Find Length
3. Sort
You have to create child of child’s as given below process tree for each task and each child exec with the image of program of particular task. Print the string after each operation.
P
C
C
C
How many number of processes will be created in the following program? Prove your answer by making a replica code that will count no of processes created.
int main()
{
fork();
fork();
fork();
fork();
}
Develop a stopwatch with lap counter and total time calculator. The program will create two processes and they will start calculating time. One process will be used to calculate total time and the other will calculate lap time. The total time calculator process will keep on calculating time. In the lap time, calculator process when it reaches lap time limit, the process will display lap number and set its counter to zero and start calculating again. Take input of lap time and number of laps from the user and start the program. At the end, display total time from total time calculator process.
Write a shell program which allows user to add data in a file emp.dat . Allow user to enter data from keyboard. The format for data file is given below
empid: ename: sal: age
If empid exits in a file then do not allow duplicate value to be inserted into file.
Write a menu driven shell script to list all the files of the current directory having read, write permission and read write permission to the user.
a. Read permission
b. Write permission
c. Read and write permission
d. exit
Write a shell program where user will take name of person. The program will return corresponding age of person on console .Shell will read value from a file called as info.txt where user information is stored in the format mentioned below
Name:Age
Write C program/ shell script which use few of the system calls directly.