Skip to content
/ pipex Public

Pipex is a project that reproduces the behaviour of the shell pipe | command in C

Notifications You must be signed in to change notification settings

hvayon/pipex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

PIPEX

Pipex is a project that reproduces the behaviour of the shell pipe | command in C

How to use

git clone https://github.com/hvayon/pipex.git

Go to pipex folder for the mandatory part

$> cd pipex

or for folder the bonus part

$> cd pipex_bonus

Build by make

$> make

Mandatory part

We read from file1, execute cmd1 with file1 as input, send the file2 to cmd2, which will write to cmd2

Program execution

$> ./pipex file1 cmd1 cmd2 file2

is equivalent to

$> < file1 cmd1 | cmd2 > file2

Bonus part

Bonus part's program handles multiple commands. Program execution

$> ./pipex file1 cmd1 cmd2 cmd3 ... cmdn file2

is equivalent to

$> < file1 cmd1 | cmd2 | cmd3 ... | cmdn > file2

I also implemented heredoc syntax. It works as follows:

$> cmd << LIMITER | cmd1 >> file | cmd2 | cmd3 ...

About

Pipex is a project that reproduces the behaviour of the shell pipe | command in C

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published