Skip to content

GiovannaCoqueiro/42cursus-pipex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42cursus

Pipex

pipex

Inside this repository, you can see all the code that has been created for the Pipex project, including the mandatory part and the bonus part.


Final score

pipex

Mandatory

Code a program, in C, that reproduces, in C, the behavior of the character pipe in the unix system and redirect some file descriptors.

Usage

$>./pipex infile cmd1 cmdN outfile

  • infile: a existing file to use as input for our program.
  • cmd1: first unix command.
  • cmd2: second unix command.
  • outfile: a file to redirect the result of the last command.

Bonus

The program must handle multiple pipelines and support heredoc function.

Multiple pipes usage

./pipex_bonus infile cmd1 cmdN outfile

  • infile: a existing file to use as input for our program.
  • cmd1: first unix command.
  • cmdN: N unix command.
  • outfile: a file to redirect the result of the last command.
Heredoc usage

./pipex_bonus here_doc LIMITER cmd1 cmdN outfile

  • LIMITER: a string to finish the append process.
  • You can also create and run any map, if it follows the requirements.
  • cmd1: first unix command.
  • cmdN: N unix command.
  • outfile: a file to redirect the result of the last command.

Instructions to use

Clone this repository in you local computer using a terminal:

After cloning the project in your local reposiory you can run some commands you can find in Makefile:

  • $> make all: or just make compiles the project
  • $> make clean: deletes the object files created during compilation
  • $> make fclean: executes the clean command and also deletes the binary created
  • $> make re: executes the fclean command followed by the all command
  • $> make bonus: compiles the project
  • $> make re: executes the fclean command followed by the rebonus command

About

42 pipex project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published