{"id":18319917,"url":"https://github.com/mushigarou/pipex","last_synced_at":"2025-04-09T14:23:15.993Z","repository":{"id":158450494,"uuid":"602866610","full_name":"Mushigarou/Pipex","owner":"Mushigarou","description":"Pipex handles pipes and redirections in Unix / Linux systems","archived":false,"fork":false,"pushed_at":"2024-07-15T03:36:07.000Z","size":176,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T08:20:48.036Z","etag":null,"topics":["unix","unix-command","unix-philosophy"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mushigarou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-17T05:20:53.000Z","updated_at":"2024-07-15T03:36:10.000Z","dependencies_parsed_at":"2024-12-23T08:38:14.713Z","dependency_job_id":null,"html_url":"https://github.com/Mushigarou/Pipex","commit_stats":null,"previous_names":["leakedbytebuster/pipex","mushigarou/pipex"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mushigarou%2FPipex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mushigarou%2FPipex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mushigarou%2FPipex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mushigarou%2FPipex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mushigarou","download_url":"https://codeload.github.com/Mushigarou/Pipex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054266,"owners_count":21039966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["unix","unix-command","unix-philosophy"],"created_at":"2024-11-05T18:14:41.070Z","updated_at":"2025-04-09T14:23:15.969Z","avatar_url":"https://github.com/Mushigarou.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pipex\n## Usage\nPipex is a program that handles pipes and redirections in Unix / Linux systems.\n\nFor the mandatory part :\n```\n make\n ./pipex infile cmd_1 cmd_2 outfile\n ```\n \nFor the bonus part :\n```\n make\n ./pipex infile cmd_1 ... cmd_n outfile\n ```\n \nThe program supports heredocument too, here is the syntax that should be given to the program :\n```\n ./pipex here_doc DELIMITER cmd_1 ... cmd_n outfile\n ```\n \nIn the mandatoy part, I've created one pipe (pipe(2)) to communicate between the two child processes. Then, i forked (fork(2)) twice in the parent process, and i wait for the child processes before returning zero upon successful completion.\n\nMaking a command write its output in the pipe, instead of STDOUT_FILENO, is done by using the dup2(2) function.\n## Visualisation On How To Handle A Single Pipe :\n![Page_2_3](https://user-images.githubusercontent.com/115739322/226490616-32166bc2-e2c7-4d64-a587-e4fed3b45c85.png)\n\n## Bonus\nFor the bonus part, we have to handle multiple pipes, and `«` and `»` when the first parameter is \"here_doc\".\n\n### This command:\n```\n ./pipex file1 cmd1 cmd2 cmd3 ... cmdn file2\n ```\n \nShould behave like :\n```\n \u003c file1 cmd1 | cmd2 | cmd3 ... | cmdn \u003e file2\n ```\n### And this :\n\n```\n ./pipex here_doc LIMITER cmd cmd1 file\n ```\nShould behave like\n```\n$\u003e cmd \u003c\u003c LIMITER | cmd1 \u003e\u003e file\n```\n## Visualisation On How To Handle Multiple Pipes :\n![Page_1_4](https://user-images.githubusercontent.com/115739322/227705339-e15003c5-fde2-4436-98b3-8912e3870d32.png)\n\nThis project is licensed under the MIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmushigarou%2Fpipex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmushigarou%2Fpipex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmushigarou%2Fpipex/lists"}