Skip to content

42 pipex project: Replicating Unix shell command functionality with a focus on pipes and redirections.

Notifications You must be signed in to change notification settings

jmatheis00/42_pipex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42_pipex

The Pipex project deepens understanding of Unix concepts such as Redirections and Pipes, providing an introduction to more advanced Unix tasks. This project involves creating a program that replicates the functionality of shell commands using pipes and data redirection, like < file1 cmd1 | cmd2 > file2. The mandatory part focuses on handling two commands, while the bonus part allows you to work with multiple commands and introduces "here_doc" functionality. Throughout the project, there is a strong focus on error handling, memory management and of course proper handling of pipes, providing valuable insights into Unix data flow.

Usage

  1. clone this repository and cd into it:
git clone https://github.com/jmatheis00/42_pipex.git && cd 42_pipex

2.1 MANDATORY PART

2.1.1 Compile the project using make:

make

2.1.2 Run the project with the following command:

./pipex file1 cmd1 cmd2 file2

behaves like this shell command: < file1 cmd1 | cmd2 > file2


2.2 BONUS PART

2.2.1 Compile the project using make bonus:

make bonus

2.2.2 Run the project with one of the following commands:

Multiple commands:

./pipex file1 cmd1 cmd2 ... cmdn file2

behaves like this shell command: < file1 cmd1 | cmd2 | cmd3 ... | cmdn > file2

Here_doc:

./pipex here_doc LIMITER cmd cmd1 file

behaves like this shell commmand: cmd << LIMITER | cmd1 >> file

About

42 pipex project: Replicating Unix shell command functionality with a focus on pipes and redirections.

Topics

Resources

Stars

Watchers

Forks