Question: Question 2 Execute the following command to create a data.txt file which contains 100.000 random letters and numbers: cat /dev/urandom | tr -dc 'a-z0-9' |
Question 2 Execute the following command to create a data.txt file which contains 100.000 random letters and numbers: cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 100000 | head -n 1 > data.txt Now write a C program which creates two child processes. The first child process must count the letters, while the other child process must count the numbers. Both child processes must print their results on screen. In the meanwhile, parent process must display child process ID's on screen and wait for both processes to end. Sample Run $ ./question2 [PARENT] Child process ID: 3587 [CHILD1] Number of letters: 58392 [PARENT] Child process ID: 3588 [CHILD2] Number of numbers: 41608
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
