Skip to content

lmoraesdev/pipex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 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.


Mandatory

pipex must:

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

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/lmoraesdev/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

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published