Question
Write a program that reads a file of commands and executes them all in
background mode.
The file name is given as a command line argument.
This batch process starter must wait for all the programs to finish before
it exits. (2.0%)
A sample file that may be presented to your program could contain:
date
ls -l
sleep 1
cat fred.c
Notes:
- The lines in the file contain the program name and its parameters.
You need to sort out the parameters from the command.
Answer