{"id":24503956,"url":"https://github.com/sidd-77/cpp-sh","last_synced_at":"2026-04-09T21:52:50.075Z","repository":{"id":273375850,"uuid":"919501743","full_name":"Sidd-77/cpp-sh","owner":"Sidd-77","description":"Shell written in C++ from scratch","archived":false,"fork":false,"pushed_at":"2025-01-20T14:57:05.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T15:25:39.953Z","etag":null,"topics":["cpp","shell"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sidd-77.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-01-20T14:04:34.000Z","updated_at":"2025-01-20T14:53:33.000Z","dependencies_parsed_at":"2025-01-20T15:25:46.509Z","dependency_job_id":"5b9806e3-e099-420b-9eec-5232750299ac","html_url":"https://github.com/Sidd-77/cpp-sh","commit_stats":null,"previous_names":["sidd-77/cpp-sh"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sidd-77%2Fcpp-sh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sidd-77%2Fcpp-sh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sidd-77%2Fcpp-sh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sidd-77%2Fcpp-sh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sidd-77","download_url":"https://codeload.github.com/Sidd-77/cpp-sh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243704265,"owners_count":20334122,"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":["cpp","shell"],"created_at":"2025-01-21T23:19:15.405Z","updated_at":"2025-10-11T23:32:03.821Z","avatar_url":"https://github.com/Sidd-77.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shell in C++\n\n## Overview\nThis is a simple shell written in C++ from scratch. It supports various shell-like features including command execution, piping, background processes, and I/O redirection.\n\n![image (1)](https://github.com/user-attachments/assets/f28371bc-25b3-4d20-bf71-7dd1d750cdab)\n\n## Features\n- **Execute Commands**: Run standard system commands.\n- **Change Directory (`cd`)**: Navigate between directories.\n- **Help Command (`help`)**: Display available commands.\n- **Background Execution (`\u0026`)**: Run processes in the background.\n- **Check Background Processes (`checkbg`)**: View running background jobs.\n- **Piping (`|`)**: Connect commands using pipes.\n- **I/O Redirection (`\u003e` and `\u003e\u003e`)**: Redirect command output to files.\n\n## Installation \u0026 Compilation\n### Prerequisites\n- C++ Compiler (G++ recommended)\n- Make (for compilation automation)\n\n### Build Instructions\nTo compile the shell, use the provided **Makefile**:\n```sh\nmake\n```\nThis generates the executable `shell`.\n\n### Running the Shell\nAfter compilation, run the shell with:\n```sh\n./shell\n```\n\n### Cleaning Up\nTo remove compiled files, run:\n```sh\nmake clean\n```\n\n## Usage\n### Running Commands\nYou can run any system command just like in a normal shell:\n```sh\nls\npwd\necho \"Hello, World!\"\n```\n\n### Changing Directories\n```sh\ncd \u003cdirectory\u003e\n```\nExample:\n```sh\ncd /home/user\n```\n\n### Background Execution\nRun a command in the background by appending `\u0026`:\n```sh\ntop \u0026\n```\nUse `checkbg` to view background processes:\n```sh\ncheckbg\n```\n\n### Piping Commands\nUse `|` to pass the output of one command as input to another:\n```sh\nls | grep .cpp\n```\n\n### I/O Redirection\n- Overwrite file output:\n  ```sh\n  echo \"Hello\" \u003e file.txt\n  ```\n- Append to a file:\n  ```sh\n  echo \"Hello Again\" \u003e\u003e file.txt\n  ```\n\n### Display Help\nRun:\n```sh\nhelp\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidd-77%2Fcpp-sh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsidd-77%2Fcpp-sh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsidd-77%2Fcpp-sh/lists"}