{"id":22513239,"url":"https://github.com/sharduljunagade/run-c-cpp-scripts","last_synced_at":"2026-04-18T17:32:53.285Z","repository":{"id":266792792,"uuid":"899358847","full_name":"ShardulJunagade/run-c-cpp-scripts","owner":"ShardulJunagade","description":"This repository contains cross-platform scripts for compiling and running C/C++ programs, providing seamless support for Unix-like systems and Windows with automatic cleanup and error handling.","archived":false,"fork":false,"pushed_at":"2024-12-06T06:04:22.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-06T19:11:28.843Z","etag":null,"topics":["c","cpp"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/ShardulJunagade.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,"zenodo":null}},"created_at":"2024-12-06T05:26:19.000Z","updated_at":"2024-12-06T06:12:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"92f4cb36-4233-46df-9e46-5b7c4d3a0bbc","html_url":"https://github.com/ShardulJunagade/run-c-cpp-scripts","commit_stats":null,"previous_names":["sharduljunagade/run-c-cpp-scripts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ShardulJunagade/run-c-cpp-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShardulJunagade%2Frun-c-cpp-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShardulJunagade%2Frun-c-cpp-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShardulJunagade%2Frun-c-cpp-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShardulJunagade%2Frun-c-cpp-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShardulJunagade","download_url":"https://codeload.github.com/ShardulJunagade/run-c-cpp-scripts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShardulJunagade%2Frun-c-cpp-scripts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268654897,"owners_count":24285124,"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-04T02:00:09.867Z","response_time":79,"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":["c","cpp"],"created_at":"2024-12-07T03:10:28.700Z","updated_at":"2026-04-18T17:32:53.245Z","avatar_url":"https://github.com/ShardulJunagade.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C/C++ Program Runner Scripts\n\nThis repository contains scripts for compiling and running C/C++ programs seamlessly across different platforms. Each script performs the following tasks:\n1. Compiling the given `.c` or `.cpp` file.\n2. Running the compiled executable.\n3. Displaying the program's output.\n4. Deleting the executable after execution.\n\n## Features\n- Supports both `.c` and `.cpp` files.\n- Automatic cleanup of compiled executables.\n- Error handling for missing files or unsupported extensions.\n- Cross-platform support.\n\n## Prerequisites\n- **GNU Compiler Collection (GCC)** or **G++** installed on your system.\n- Ensure the scripts are executable (e.g., `chmod +x run_cpp.sh` for Bash).\n\n\n## Scripts Overview\n\n### 1. Bash Script (`run_cpp.sh`)\n- Platform: Unix-like systems (Linux, macOS)\n- Usage: \n    ```bash\n    run_cpp.sh filename.c\n    run_cpp.sh filename.cpp\n    ```\n\n\n### 2. PowerShell Script (`run_cpp.ps1`)\n- Platform: Windows\n- Usage:\n    ```powershell\n    run_cpp.ps1 filename.c\n    run_cpp.ps1 filename.cpp\n    ```\n\n### 3. Batch Script (`run_cpp.bat`) for CMD\n- Platform: Windows\n- Usage:\n    ```cmd\n    run_cpp.bat filename.c\n    run_cpp.bat filename.cpp\n    ```\nAn `example.cpp` file has been included in the repository. You can use this file to test or verify that the scripts are working as expected.\n\n## Making the Scripts Globally Executable\n\nTo simplify usage, you can add the script's directory to your system's `PATH`. This allows you to run the script directly from anywhere using:\n```\nrun_cpp filename.c\nrun_cpp filename.cpp\n```\n\n**Note:** In Windows, this behavior depends on your environment configuration. If it doesn’t work, use the full script name (`run_cpp.ps1` or `run_cpp.bat`) depending on your terminal.\n\n\n\n## License\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharduljunagade%2Frun-c-cpp-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharduljunagade%2Frun-c-cpp-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharduljunagade%2Frun-c-cpp-scripts/lists"}