{"id":20461279,"url":"https://github.com/infectedduck/shell-in-c","last_synced_at":"2025-08-13T23:07:31.243Z","repository":{"id":255020832,"uuid":"848294882","full_name":"InfectedDuck/Shell-In-C","owner":"InfectedDuck","description":"A basic Unix-like shell implemented in C, featuring command execution, piping, input/output redirection, and built-in commands like. Designed to showcase fundamental operating system concepts and process management.","archived":false,"fork":false,"pushed_at":"2024-09-14T02:48:47.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T11:35:21.020Z","etag":null,"topics":[],"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/InfectedDuck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2024-08-27T13:56:20.000Z","updated_at":"2025-03-04T08:34:50.000Z","dependencies_parsed_at":"2024-08-27T15:25:23.139Z","dependency_job_id":"2bdac7de-80a4-4b17-a144-59cf3f57fc02","html_url":"https://github.com/InfectedDuck/Shell-In-C","commit_stats":null,"previous_names":["infectedduck/shell-in-c"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/InfectedDuck/Shell-In-C","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfectedDuck%2FShell-In-C","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfectedDuck%2FShell-In-C/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfectedDuck%2FShell-In-C/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfectedDuck%2FShell-In-C/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InfectedDuck","download_url":"https://codeload.github.com/InfectedDuck/Shell-In-C/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfectedDuck%2FShell-In-C/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270330595,"owners_count":24565816,"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-08-13T02:00:09.904Z","response_time":66,"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":[],"created_at":"2024-11-15T12:24:37.404Z","updated_at":"2025-08-13T23:07:31.220Z","avatar_url":"https://github.com/InfectedDuck.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Shell\n\n## Overview\n\nThis project implements a simple Unix-like shell in C. The shell supports basic command execution, piping, input/output redirection, and handling of internal commands like `cd` and `exit`. This shell is designed to demonstrate fundamental concepts in operating systems and process management.\n\n## Features\n\n- **Command Execution**: Execute commands entered by the user.\n- **Piping**: Use the output of one command as the input to another.\n- **Input/Output Redirection**: Redirect input from a file and output to a file.\n- **Internal Commands**: Built-in commands like `cd` (change directory) and `exit` (terminate the shell).\n\n## Installation\n\n### On Windows\n\n1. **Install MinGW:**\n   - Download and install MinGW from [MinGW SourceForge](https://sourceforge.net/projects/mingw/).\n   - During installation, select the `mingw32-gcc-g++` package.\n   - Add the MinGW `bin` directory to your system's PATH environment variable.\n\n2. **Compile the Shell:**\n   - Open Command Prompt (`cmd`).\n   - Navigate to the directory containing `shell.c`:\n     ```bash\n     cd C:\\Users\\Admin\\Desktop\\my_shell\n     ```\n   - Compile the program:\n     ```bash\n     gcc shell.c -o shell.exe\n     ```\n\n3. **Run the Shell:**\n   - Execute the compiled shell:\n     ```bash\n     shell.exe\n     ```\n\n### On Linux or Windows Subsystem for Linux (WSL)\n\n1. **Install WSL:**\n   - Open PowerShell as Administrator and run:\n     ```bash\n     wsl --install\n     ```\n   - Install a Linux distribution from the Microsoft Store (e.g., Ubuntu).\n\n2. **Install GCC:**\n   - Open the WSL terminal.\n   - Install GCC:\n     ```bash\n     sudo apt update\n     sudo apt install gcc\n     ```\n\n3. **Compile the Shell:**\n   - Navigate to the directory containing `shell.c`:\n     ```bash\n     cd /mnt/c/Users/Admin/Desktop/my_shell\n     ```\n   - Compile the program:\n     ```bash\n     gcc shell.c -o shell\n     ```\n\n4. **Run the Shell:**\n   - Execute the compiled shell:\n     ```bash\n     ./shell\n     ```\n\n## Usage\n\nOnce you have compiled and run the shell, you can use it by typing commands at the prompt. Here are some examples:\n\n- **Execute a command**: \n  ```bash\n  ls -l\n  ```\n- **Use piping**: \n  ```bash\n  ls -l | grep \".c\"\n  ```\n- **Redirect output to a file**: \n  ```bash\n  echo \"Hello, World!\" \u003e output.txt\n  ```\n- **Redirect input from a file**: \n  ```bash\n  sort \u003c input.txt\n  ```\n\n## Contributing\n\nIf you have any improvements or bug fixes, please submit a pull request or open an issue. Contributions are welcome!\n\n## Acknowledgments\n\nThis project was created to demonstrate basic shell functionalities and to provide hands-on experience with process management and command execution in C.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfectedduck%2Fshell-in-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfectedduck%2Fshell-in-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfectedduck%2Fshell-in-c/lists"}