{"id":25580331,"url":"https://github.com/ah-ibrahim/shell","last_synced_at":"2025-09-09T12:34:25.106Z","repository":{"id":277627705,"uuid":"933030265","full_name":"Ah-Ibrahim/Shell","owner":"Ah-Ibrahim","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-15T02:16:55.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T02:30:09.892Z","etag":null,"topics":["cpp","language-processing","lex","operating-system","yacc"],"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/Ah-Ibrahim.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-02-15T01:32:21.000Z","updated_at":"2025-02-15T02:16:58.000Z","dependencies_parsed_at":"2025-02-15T02:40:16.555Z","dependency_job_id":null,"html_url":"https://github.com/Ah-Ibrahim/Shell","commit_stats":null,"previous_names":["ah-ibrahim/shell"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ah-Ibrahim%2FShell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ah-Ibrahim%2FShell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ah-Ibrahim%2FShell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ah-Ibrahim%2FShell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ah-Ibrahim","download_url":"https://codeload.github.com/Ah-Ibrahim/Shell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239952637,"owners_count":19723924,"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","language-processing","lex","operating-system","yacc"],"created_at":"2025-02-21T04:15:31.274Z","updated_at":"2025-02-21T04:15:31.924Z","avatar_url":"https://github.com/Ah-Ibrahim.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shell Project\n\n## Overview\n\nThis project is a simple shell implementation in C++ that supports executing commands, handling input/output redirection, and piping multiple commands. It demonstrates process management using `fork`, `execvp`, and `waitpid` system calls.\n\n## Features\n\n- Command execution\n- Input (`\u003c`), output (`\u003e`), and error (`2\u003e`) redirection\n- Pipelining (`|`) support for chaining commands\n- Background process execution using `\u0026`\n- Color-coded output for logs and errors\n\n## Requirements\n\nTo build and run the shell, ensure you have:\n\n- A Linux-based system\n- g++ compiler\n- Make\n\n## Installation \u0026 Compilation\n\n```sh\n# Clone the repository\ngit clone https://github.com/Ah-Ibrahim/Shell.git\ncd /Shell\n\n# Compile the shell\nmake   # If a Makefile is available\n\n# Then run the shell\n./shell\n```\n\n## Usage\n\n```sh\n./shell\n```\n\nOnce inside the shell, you can execute commands like:\n\n```sh\nls -l\nls | grep .cpp\ncat file.txt \u003e output.txt\n./script.sh \u0026\n```\n\n## Files\n\n```\n├── .gitignore            # Git ignore file\n├── command.cc            # Command class implementation\n├── command.h             # Command class header file\n├── command.o             # Compiled object file\n├── lex.yy.c              # Generated lexical analyzer\n├── lex.yy.o              # Lexical analyzer object file\n├── Makefile              # Compilation instructions\n├── process_log.txt       # Log file for processes\n├── README.md             # Documentation\n├── shell                 # Shell executable\n├── shell.l               # Lex file for lexical analysis\n├── shell.y               # Yacc/Bison grammar file\n├── y.tab.c               # Generated parser code\n├── y.tab.h               # Generated parser header\n├── y.tab.o               # Parser object file\n```\n\n## Issues \u0026 Debugging\n\nIf you encounter issues:\n\n- Ensure the compiled binary has execution permissions: `chmod +x myshell`\n- Use `strace ./myshell` to debug system calls\n- Add debug prints in `execute()` to track fork and execvp behavior\n\n## Author\n\nDeveloped by Ahmed Ibrahim. Contributions and feedback are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fah-ibrahim%2Fshell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fah-ibrahim%2Fshell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fah-ibrahim%2Fshell/lists"}