Pipex is a simple c program that mimics the functionality of a shell command that looks like this:
< file1 cmd1 | cmd2 > file2
The project is part of the Codam curriculum. The main learning goals are:
- Introduction to forking and piping within c programs
- Buildup for future project of rebuilding bash in C
Pipex is run as:
./pipex file1 "cmd1" "cmd2" file2
- File1: path to input file
- First bash command with parameters
- Second bash command
- File2: path to output file
Return values
Return value should be the same as the exit code of the second command
The entire project is written in accordance with the 42 Network Norm. The norm puts readability above everything and can therefore sometimes be limiting in terms of writing the most optimal code.