This project was made in accordance with the project of School 21 (Ecole 42).
The purpose of this project is to simulate UNIX mechanism - pipe.
You can see the subject here: pipex.
Main requirements, rules and code style: Norm.
- Our objective is to code
pipex
that should be executed in this way:
./pipex file1 cmd1 cmd2 file2
- Execution of
pipex
should be similar to the next shell command:
< file1 cmd1 | cmd2 > file2
file1
, file2
- filenames
cmd1
, cmd2
- shell commands with their parameters
- Handling errors must be like in shell
pipex
should handle multiple pipes:
./pipex file1 cmd1 cmd2 cmd3 ... cmdn file2
is equivalent to next shell command:
< file1 cmd1 | cmd2 | cmd3 ... | cmdn > file2
pipex
should support«
and»
when the first parameter ishere_doc
:
./pipex here_doc LIMITER cmd1 cmd2 file
is equivalent to next shell command:
cmd1 << LIMITER | cmd2 >> file
- Clone this repository:
git clone https://github.com/Haimasker/pipex.git
- Go to the project folder:
cd pipex
- To compile mandatory part:
make
- To compile bonus part:
make bonus
- After compilation just run
pipex
with your parameters.