i am currently stuck on a project and would appriciate any help.
i have to write a spawn program which accepts info from the command line and then sorts out the arguments.
if -o is an argument then the following arg is the filename where the o/p is sent.
if -e is present the the next arg is the file name where the errors are sent.
$ spawn [-o filename] [-e filename] command_sequence
$ ./spawn -o list.dat ls -l /home/jbloggs
[New list.dat file contains long listing of the jbloggs directory.]