Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pipex

42cursus' project #6

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.


Final score

cado-car's 42Project Score

Completed + Bonus

cado-car's 42Project Badge

Mandatory

pipex must:

  • read and write from/to files;
  • redirect single pipes and truncate existing file output.

Bonus

pipex can:

  • redirect multiple commands;
  • open terminal for here_doc option.

The project

Implementation files

Header files

Main file

Utilities

Error management and program closing


Usage

Requirements

pipex requires a clang compiler and some standard libraries.

Instructions

Clone this repository in your local computer:

$> git clone https://github.com/caroldaniel/42sp-cursus-pipex.git path/to/pipex

In your local repository, run make

$> make 

make suports 6 flags:

  • make all or simply make compiles pipex in its mandatory format
  • make bonus compiles pipex in its bonus format
  • make clean deletes the .o files generated during compilation
  • make fclean deletes the .o and the pipex file generated
  • make re executes fclean and all in sequence, recompiling the program
  • make rebonus executes fclean and bonus in 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.

About

This is the repository folder for the pipex project, an executable for the shell pipe command.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages