{"id":13339646,"url":"https://github.com/PsychoCod3r/Unix-Expansion-Pack","last_synced_at":"2025-03-11T14:32:01.431Z","repository":{"id":158802227,"uuid":"365836882","full_name":"PsychoCod3r/Unix-Expansion-Pack","owner":"PsychoCod3r","description":"Scripts implementing additional Unix commands and hacks","archived":false,"fork":false,"pushed_at":"2024-12-06T14:53:59.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-06T15:44:07.662Z","etag":null,"topics":["shell","shell-script","unix","unix-shell","unix-shell-programs"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PsychoCod3r.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-09T19:57:56.000Z","updated_at":"2024-12-06T14:54:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"bdc3e032-68af-4df1-8c30-f9013772fa4f","html_url":"https://github.com/PsychoCod3r/Unix-Expansion-Pack","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/PsychoCod3r%2FUnix-Expansion-Pack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsychoCod3r%2FUnix-Expansion-Pack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsychoCod3r%2FUnix-Expansion-Pack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsychoCod3r%2FUnix-Expansion-Pack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PsychoCod3r","download_url":"https://codeload.github.com/PsychoCod3r/Unix-Expansion-Pack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243051979,"owners_count":20228304,"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":["shell","shell-script","unix","unix-shell","unix-shell-programs"],"created_at":"2024-07-29T19:21:07.915Z","updated_at":"2025-03-11T14:32:01.415Z","avatar_url":"https://github.com/PsychoCod3r.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unix Expansion Pack\nScripts implementing additional Unix commands and hacks\n\n----\n\n## Included commands:\n\n`calendar-cpp`: Adds full CPP capabilities to the BSD `calendar` program. You can alias the `calendar` command to this script, although the options may be somewhat different.\n\n`factorial`: Arbitrary precision factorial calculator - takes a positive integer of any size as its argument and computes the factorial. (Anything other than a positive integer causes an error.)\n\n`loc`: Lines Of Code calculator - takes a C file as its parameter and computes how many non-comment, non-whitespace lines are in that file.\n\n`radix`: Converts a number from one base to another. Can use any base.\n\n`randline`: Selects a random line from a file, or one random line each from a list of files. Great for people like me who suffer from choice paralysis. I figured someone else might find it useful too.\n\n`rchmod`: Works just like the `chmod` command except it changes permissions for all files in a directory tree, including the root of that tree. This is most useful for adding permissions to files hosted on a server so you can access them remotely.\n\n`rcmd`: Adaptation of `rchmod` to execute any command recursively on a directory tree. Can use either a Unix command or a script, and can be set to execute a command on an entire directory for each directory it traverses (e.g. `ls`) or on individual files within each directory (e.g. `chmod`). As of this update, `rchmod` is now deprecated and will probably be removed in the future.\n\n`usleep`: I noticed that my version of Linux did not have a `usleep` command so I wrote one in C. It's a fairly simple program that just does some basic error checking on the argument and then invokes the `usleep()` function in the POSIX API. This version of `usleep` has three possible exit codes: 0 for success, 1 for wrong number of arguments, and 2 for non-integer argument.\n\n----\n\n## Dependencies:\n\nFor `calendar-cpp` to work, the `calendar` program must be installed. `loc` is dependent on `sed` while `factorial` and `radix` are dependent on `dc`, but these two programs come preinstalled on almost every Unix/Linux system, so it shouldn't be a problem.\n\n----\n\n## Installation:\n\nTo install, set execute permission for all scripts and then copy them to /usr/local/bin.\n\n    $ cd bin\n    $ chmod a+x *\n    $ sudo cp * /usr/local/bin\n\nOr just run the install script:\n\n    $ source install\n\n----\n\n## Notes:\n\nCertain scripting features used by these scripts don't work on modern versions of Cygwin. I can get them to work on actual Unix/Linux systems and on old versions of Cygwin, but the current version doesn't run these scripts correctly for some reason. Features that no longer work on Cygwin include the `getopts` shell command and the branching commands in sed. So if you're a Unix person who uses Windows for convenience, consider using actual Unix/Linux to run these scripts. Sorry for the inconvenience.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPsychoCod3r%2FUnix-Expansion-Pack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPsychoCod3r%2FUnix-Expansion-Pack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPsychoCod3r%2FUnix-Expansion-Pack/lists"}