42 project pipex, passed 125/100
Discover in detail a UNIX mechanism that we already know by using it in our program.
Executing C programs "on steroids" leveraging the full reach of the shell and system calls.
Each time you call a system process its execution will overwrite the running process, therefore you'll need to "fork" i.e. reproduce an exact copy of the memory at a point in time and "sacrifice" it for system execution. This compels you also to manage input and output with file descriptors accordingly, piping information in logical and timely ways, as well as handle potential erorrs that may arise and forward exit statuses. In all a great learning experience also this time, so fasten your seat belts and get ready for some hard thinking should you decided to try this kind of project.
make
./pipex infile "shell cmd with options" "shell cmd with options" outfile
equates to:
< infile shell cmd with options | shell command with options > outfile
make bonus
same as mandatory but n pipes allowed
./pipex here_doc DELIMITER "shell cmd with options" "shell cmd with options" outfile
equates to:
shell cmd with options <<DELIMITER | shell cmd with options >> outfile
The staff at codevault; 42 Heilbronn's fellow students Alessandro, Max, Rouven, Jamshidbek, Hei Yiu, Florian among many other smart brains too many to mention here, in addition to great evaluators and people around the world who built and shared great code, learnings and tests; 42 Heilbronn's staff who make this possible at all | thank You all.