{"id":22153181,"url":"https://github.com/dpetrosy/42-pipex","last_synced_at":"2026-04-12T22:36:21.706Z","repository":{"id":226214853,"uuid":"768070720","full_name":"dpetrosy/42-Pipex","owner":"dpetrosy","description":"42 School Pipex project aimed to better understand shell redirection and pipes, by handling them in C.","archived":false,"fork":false,"pushed_at":"2024-04-03T13:20:57.000Z","size":1578,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T13:45:25.140Z","etag":null,"topics":["42","42-pipex","42born2code","42cursus","42pipex","42projects","42school","42yerevan","c","c-programming","child-process","command-line","dup2","execve","fork","pipes","pipex","pipex-42","pipex42","shell"],"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/dpetrosy.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}},"created_at":"2024-03-06T12:18:15.000Z","updated_at":"2024-03-18T17:31:18.000Z","dependencies_parsed_at":"2024-03-18T18:43:26.837Z","dependency_job_id":"ae3cbdfa-a754-4aee-b68f-7c64423e0632","html_url":"https://github.com/dpetrosy/42-Pipex","commit_stats":null,"previous_names":["dpetrosy/42-pipex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dpetrosy/42-Pipex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpetrosy%2F42-Pipex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpetrosy%2F42-Pipex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpetrosy%2F42-Pipex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpetrosy%2F42-Pipex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpetrosy","download_url":"https://codeload.github.com/dpetrosy/42-Pipex/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpetrosy%2F42-Pipex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278395892,"owners_count":25979685,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["42","42-pipex","42born2code","42cursus","42pipex","42projects","42school","42yerevan","c","c-programming","child-process","command-line","dup2","execve","fork","pipes","pipex","pipex-42","pipex42","shell"],"created_at":"2024-12-02T01:17:21.194Z","updated_at":"2025-10-05T00:39:35.443Z","avatar_url":"https://github.com/dpetrosy.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- Logo --\u003e\n  \u003ca href=\"https://github.com/dpetrosy/42-Pipex\"\u003e\n  \u003cimg src=\"README_files/logo.png\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n  \u003c!-- Project Name --\u003e\n  \u003ch1\u003ePipex Project\u003c/h1\u003e\n\n  \u003c!-- Short Description --\u003e\n  \u003cp align=\"center\"\u003e\n\t  \u003cb\u003e42 Yerevan Pipex\u003c/b\u003e\u003cbr\u003e\n\t  For further information about 42cursus and its projects, please refer to \u003ca href=\"https://github.com/dpetrosy/42cursus\"\u003e\u003cb\u003e42cursus repo\u003c/b\u003e\u003c/a\u003e.\n  \u003c/p\u003e\n\n  \u003c!-- Badges --\u003e\n  \u003cp\u003e\n    \u003cimg src=\"https://img.shields.io/badge/score-115%20%2F%20100-success?style=for-the-badge\" /\u003e\n    \u003cimg src=\"https://img.shields.io/github/repo-size/dpetrosy/42-Pipex?style=for-the-badge\u0026logo=github\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/languages/count/dpetrosy/42-Pipex?style=for-the-badge\u0026logo=\" /\u003e\n    \u003cimg src=\"https://img.shields.io/github/languages/top/dpetrosy/42-Pipex?style=for-the-badge\" /\u003e\n    \u003cimg src=\"https://img.shields.io/github/last-commit/dpetrosy/42-Pipex?style=for-the-badge\" /\u003e\n  \u003c/p\u003e\n\n  \u003ch3\u003e\n      \u003ca href=\"#-about-project\"\u003e📜 About Project\u003c/a\u003e\n    \u003cspan\u003e · \u003c/span\u003e\n      \u003ca href=\"#-mandatory-part\"\u003e🔷 Mandatory Part\u003c/a\u003e\n    \u003cspan\u003e · \u003c/span\u003e\n\t  \u003ca href=\"#-bonus-part\"\u003e🌟 Bonus Part\u003c/a\u003e\n    \u003cspan\u003e · \u003c/span\u003e\n      \u003ca href=\"#-usage\"\u003e👨‍💻 Usage\u003c/a\u003e\n  \u003c/h3\u003e\n\u003c/div\u003e\n\n---\n\n## 📜 About Project\n\n\u003e This pipex program takes an input file, performs a command on it, pipes the result to another command which then writes its result to an output file. The result is virtually identical to this kind of shell command.\n\nFor detailed information, refer to the [**subject of this project**](README_files/pipex_subject.pdf).\n\n\t🚀 TLDR: Pipex is a 42 School project aimed to better understand shell redirection and \n \t\t pipes, by handling them in C.\n\n\u003e [!NOTE]  \n\u003e Because of 42 School norm requirements:\n\u003e * Each function can't have more than 25 lines of code.\n\u003e * All variables are declared and aligned at the top of each function.\n\u003e * Project should be created just with allowed functions otherwise it's cheating.\n\n## 🔷 Mandatory Part\n\nThe program `pipex` should repeat the behavior of the next shell command:\n```bash\n$\u003e \u003c file1 cmd1 | cmd2 \u003e file2\n```\nand looks like this:\n```bash\n$\u003e ./pipex file1 cmd1 cmd2 file2\n```\n\n\u003e [!NOTE]  \n\u003e All errors like: wrong commands,  permission to files and etc are handled.\n\n## 🌟 Bonus Part\n\nProgram needs to handle multiple pipes:\n```bash\n$\u003e \u003c file1 cmd1 | cmd2 | cmd3 | ... | cmdn \u003e file2\n```\n\nand looks like this:\n```bash\n$\u003e ./pipex file1 cmd1 cmd2 cmd3 ... cmdn file2\n```\n\n## 👨‍💻 Usage\n### Requirements\n\nThe program is written in C language and thus needs the **gcc compiler** and some standard **C libraries** to run.\n\n### Instructions\n\n**1. Compiling the program**\n\nTo compile the program, run:\n\n```shell\n$ cd path/to/pipex \u0026\u0026 make\n```\n\n**2. How to run the program**\n\nRun the executable with commands of your choice:\n```shell\n./pipex input \"cat\" \"wc -l\" output\n```\n\nUse `clean` to delete all object files, `fclean` to remove executable and all object files, and `re` to recompile the program:\n```shell\nmake clean / make fclean / make re\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpetrosy%2F42-pipex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpetrosy%2F42-pipex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpetrosy%2F42-pipex/lists"}