Pipex is a project that focuses on handling pipes in C. The goal is to recreate the functionality of shell pipes, allowing the execution of commands with input and output redirection.
The program takes 4 arguments:
./pipex file1 cmd1 cmd2 file2
file1andfile2are file names.cmd1andcmd2are shell commands with their parameters.
- Clone the repository
- Run
maketo compile the project - Execute the program with the required arguments
./pipex infile "ls -l" "wc -l" outfile
# Should behave like: < infile ls -l | wc -l > outfile
./pipex infile "grep a1" "wc -w" outfile
# Should behave like: < infile grep a1 | wc -w > outfile./pipex file1 cmd1 cmd2 cmd3 ... cmdn file2
# Should behave like: < file1 cmd1 | cmd2 | cmd3 ... | cmdn > file2
'''