The pipex program is a executable for the `pipe` shell command, where you can redirect the output of some commands to the input of others.
pipex must:
- read and write from/to files;
- redirect single pipes and truncate existing file output.
Header files
Main file
Utilities
Error management and program closing
pipex requires a clang compiler and some standard libraries.
Clone this repository in your local computer:
$> git clone https://github.com/lmoraesdev/pipex.git path/to/pipexIn your local repository, run make
$> make
makesuports 6 flags:
make allor simplymakecompiles pipex in its mandatory formatmake bonuscompiles pipex in its bonus formatmake cleandeletes the.ofiles generated during compilationmake fcleandeletes the.oand thepipexfile generatedmake reexecutesfcleanandallin sequence, recompiling the programmake rebonusexecutesfcleanandbonusin sequence, recompiling the program with the bonus functions
To run pipex, type:
./pipex files/<choose-input-file> cmd1 cmd2 files/<choose-output-file>
# works like:
< files/<choose-input-file> cmd1 | cmd2 > files/<choose-output-file>For bonus' here_doc option, type:
./pipex here_doc LIMITER cmd1 cmd2 files/<choose-output-file>
# works like:
cmd1 << LIMITER | cmd2 >> files/<choose-output-file>./pipex also works with multiple pipes.