{"id":16164705,"url":"https://github.com/johnsonjh/cbexec","last_synced_at":"2025-04-07T04:48:56.945Z","repository":{"id":42125669,"uuid":"379201914","full_name":"johnsonjh/cbexec","owner":"johnsonjh","description":"cbexec: A universal shebang wrapper, switching based on file extension","archived":false,"fork":false,"pushed_at":"2022-04-12T15:23:49.000Z","size":35,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T09:19:37.621Z","etag":null,"topics":["cbexec","exec","hack","interp","shebang","unix"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnsonjh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-22T08:47:45.000Z","updated_at":"2025-01-07T23:21:52.000Z","dependencies_parsed_at":"2022-08-12T07:20:18.996Z","dependency_job_id":null,"html_url":"https://github.com/johnsonjh/cbexec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonjh%2Fcbexec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonjh%2Fcbexec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonjh%2Fcbexec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonjh%2Fcbexec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnsonjh","download_url":"https://codeload.github.com/johnsonjh/cbexec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595382,"owners_count":20963943,"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":["cbexec","exec","hack","interp","shebang","unix"],"created_at":"2024-10-10T02:47:30.465Z","updated_at":"2025-04-07T04:48:56.925Z","avatar_url":"https://github.com/johnsonjh.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cbexec\n\nA universal shebang wrapper (_and gross hack_),\nswitching interpreters based on file extension.\n\n---\n\n## Examples\n\n### Bash\n\n```bash\n#!/usr/bin/env cbexec\n\nbuiltin printf '%s\\n' \\\n    \"Hello Bash World!\"\n```\n\n---\n\n### C\n\n```d\n#!/usr/bin/env cbexec\n\n#include \u003cstdio.h\u003e\n\nint main() {\n    printf(\"Hello C World!\\n\");\n\treturn 0;\n}\n```\n\n---\n\n### COBOL\n\n```sh\n#!/usr/bin/env cbexec\n\n       IDENTIFICATION DIVISION.\n       PROGRAM-ID. COBOL.\n       PROCEDURE DIVISION.\n       MAIN.\n           DISPLAY 'HELLO COBOL WORLD!' END-DISPLAY.\n           STOP RUN.\n```\n\n---\n\n### C++\n\n```d\n#!/usr/bin/env cbexec\n\n#include \u003ciostream\u003e\n\nint main()\n{\n   std::cout \u003c\u003c \"Hello C++ World!\" \u003c\u003c std::endl;\n   return 0;\n}\n```\n\n---\n\n### C Shell\n\n```csh\n#!/usr/bin/env cbexec\n\nset fignore = (.o \\~) \u0026\u0026 set hw='Hello C Shell World!' \u0026\u0026 printf '%s\\n' \"$hw\";\n```\n\n---\n\n### D\n\n```d\n#!/usr/bin/env cbexec\n\nimport std.stdio;\n\nint main() {\n    writeln(\"Hello D World!\");\n\treturn 0;\n}\n```\n\n---\n\n### Emacs Lisp\n\n```elisp\n#!/usr/bin/env cbexec\n\n(message \"Hello Emacs Lisp World!\")\n```\n\n---\n\n### FORTRAN-90\n\n```sh\n#!/usr/bin/env cbexec\n\nprogram main\nimplicit none\nwrite (*, '(a)') 'Hello FORTRAN-90 World!'\nstop\nend\n```\n\n---\n\n### FORTRAN-77\n\n```sh\n#!/usr/bin/env cbexec\n\n      PROGRAM HELLOW\n      WRITE(UNIT=*,FMT='(A)')'HELLO FORTRAN-77 WORLD!'\n      STOP\n      END\n```\n\n---\n\n### Go\n\n```sh\n#!/usr/bin/env cbexec\n\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Println(\"Hello Go World!\")\n}\n```\n\n---\n\n### Korn Shell\n\n```ksh\n#!/usr/bin/env cbexec\n\nPATH=\"\"\nprint \"Hello Korn Shell World!\"\n```\n\n---\n\n### MATLAB / Octave\n\n```sh\n#!/usr/bin/env cbexec\n\nprintf(\"Hello MATLAB World!\\n\");\nquit(0);\n```\n\n---\n\n### OCaml\n\n```sh\n#!/usr/bin/env cbexec\n\nprint_sring \"Hello OCaml World!\\n\"\n```\n\n---\n\n### '\"POSIX\"' Shell\n\n```sh\n#!/usr/bin/env cbexec\n\n(\n\texec 2\u003e /dev/null\n\ttime 1\u003e /dev/null 2\u003e\u00261 \u003c /dev/null\n) || {\n\tXX=\"Hello POSIX Shell World!\" :\n\tprintf '%s\\n' \"$XX\"\n} | grep POSIX\n```\n\n---\n\n### Z Shell\n\n```zsh\n#!/usr/bin/env cbexec\n\nPATH=\"\"\n- builtin print \"Hello Z Shell World!\"\n```\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnsonjh%2Fcbexec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnsonjh%2Fcbexec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnsonjh%2Fcbexec/lists"}