The project deals with handling pipes and processes to mimic the piping behaviour of shell.
pipex program takes 4 arguments as below:./pipex file1 cmd1 cmd2 file2
where,• file1 and file2 are file names.
• cmd1 and cmd2 are shell commands with their parameters.
It must behave exactly the same as the shell.
As bonus, I also handle multiple pipes and heredoc feature. For example:
./pipex file1 cmd1 cmd2 cmd3 ... cmdn file2
shell equivalent: < file1 cmd1 | cmd2 | cmd3 ... | cmdn > file2
and heredoc as:
$> ./pipex here_doc LIMITER cmd cmd1 file
shell equivalent: cmd << LIMITER | cmd1 >> file