A 42 school project that recreates the behavior of a shell pipe (|) between two commands, implemented in C using fork, pipe, dup2 and execve. The bonus part supports multiple pipes and here_doc-style input.
Given a file, two commands and an output file, pipex runs the equivalent of:
< infile cmd1 | cmd2 > outfileIt creates a pipe and a child process for each command, redirects standard input/output accordingly, and executes each command using the system PATH.
make # builds pipex
make bonus # builds pipex_bonus (multiple pipes + here_doc)
make clean # removes object files
make fclean # also removes the executables
make re # rebuilds everything (mandatory + bonus)./pipex infile cmd1 cmd2 outfileBonus (multiple commands and/or here_doc):
./pipex_bonus infile cmd1 cmd2 ... cmdN outfile
./pipex_bonus here_doc LIMITER cmd1 cmd2 outfile- Follows the 42 Norm
- Compiles without errors or warnings (
-Wall -Wextra -Werror) - Relies on
libft,ft_printfandget_next_lineas internal libraries