Unix mecanism
This project will allow you to discover, through its use in your program, the operation of a UNIX mechanism that you are already familiar with.
For more detailed information, look at the subject of this project.
The function is written in C language and thus needs the gcc
compiler and some standard C libraries to run.
1. Compiling
To compile, go to the project path and run:
$ make
This program will replicate the behaviour of the next shell command:
$ < file1 cmd1 | cmd2 > file2
To test the program you just need to launch "pipex" with this parameters:
$ ./pipex file1 cmd1 cmd2 file2
In the bonus part the program can handle multiple pipes:
$ < file1 cmd1 | cmd2 | cmd3 | ... | cmdn > file2
To test the program you just need to launch "pipex" with this parameters:
$ ./pipex file1 cmd1 cmd2 cmd3 ... cmdn file2
Also in the bonus part the program can handle << and >> redirections:
$ cmd1 << LIMITER | cmd2 >> file2
To test the program you just need to launch "pipex" with this parameters:
$ ./pipex here_doc LIMITER cmd1 cmd2 file2