Pipex is a C programming project that emulates the behavior of a UNIX pipeline. It accepts four arguments: two file names and two shell commands, and executes them in a pipeline manner.
To get a local copy up and running, follow these simple steps.
- GCC compiler
- Make
- Clone the repo
git clone https://github.com/your_username_/pipex.git
- Compile the project
make
Run the program with the following command:
./pipex infile "command1" "command2" outfile
This will execute the commands as if you were running:
< infile command1 | command2 > outfile
in a UNIX shell.
The project has the following structure:
src/pipex.c
: Main file of the application. It contains the main function which accepts command line arguments and uses them to execute the pipex program.src/utils.c
: Contains utility functions used inpipex.c
.src/utils.h
: Header file forutils.c
.Makefile
: Used to compile the project.libft/ft_strlen.c
,libft/ft_strdup.c
,libft/ft_strjoin.c
,libft/ft_split.c
: Part of the libft library. They contain implementations of some standard C library functions.libft/libft.h
: Header file for the libft library.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Your Name - [email protected]
Project Link: https://github.com/rubendiazzz/pipex