π Preview
This project aims to make you understand a bit deeper two concepts that you already know: the redirections and the pipes. It is an introduction project.
π Objectives
Your program will run as follows: ./pipex file1 cmd1 cmd2 file2 It must take 4 arguments:
- file1 and file2 are file names.
- cmd1 and cmd2 are shell commands with their parameters.
Your program must behave exactly like the following shell command:
$> < file1 cmd1 | cmd2 > file2
π Rules
- You must make a Makefile that will compile your source files. It must not relink.
- You must handle errors with common sense. Under no circumstances should your program quit unexpectedly (segmentation error, bus error, double free, etc.).
- Your program should not have any memory leaks.
- If you have any doubt, refer to the shell command: < file1 cmd1 | cmd2 > file2