{"id":18460442,"url":"https://github.com/aludirk/bash","last_synced_at":"2026-04-30T14:34:07.288Z","repository":{"id":84995206,"uuid":"76462902","full_name":"Aludirk/bash","owner":"Aludirk","description":"A collection of handy functions for the shell script writing.","archived":false,"fork":false,"pushed_at":"2017-02-06T13:13:49.000Z","size":166,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T19:58:34.071Z","etag":null,"topics":["bash"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/Aludirk.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}},"created_at":"2016-12-14T13:40:17.000Z","updated_at":"2018-07-16T11:12:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"eb06538f-7412-4302-aec9-a5c8eef12b1b","html_url":"https://github.com/Aludirk/bash","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aludirk%2Fbash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aludirk%2Fbash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aludirk%2Fbash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aludirk%2Fbash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aludirk","download_url":"https://codeload.github.com/Aludirk/bash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250506146,"owners_count":21441722,"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":["bash"],"created_at":"2024-11-06T08:26:47.323Z","updated_at":"2026-04-30T14:34:02.256Z","avatar_url":"https://github.com/Aludirk.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# General library for Bash shell script (0.9.0)\n\nA collection of handy functions for the shell script writing, it aims for Bash 3+.\n\n* [Prerequisite](#prerequisite)\n* [Modules](#modules)\n* [Configuration](#configuration)\n  * [Debug mode](#debug-mode)\n  * [Error message colors](#error-message-colors)\n  * [Information message color](#information-message-color)\n  * [Question message color](#question-message-color)\n* [Error codes](#error-codes)\n* [Version History](#version-history)\n\n## Prerequisite\n\nSome features are based on [Perl5](https://www.perl.org) to implement (use for [PCRE](http://www.pcre.org/)).\n\n## Modules\n\nAll modules are tested in macOS and linux.\n\nModule | File | Description\n----- | ----- | -----\n[Command](doc/command.md) | [command.sh](command.sh) | Command/Function utility.\n[Dictionary](doc/dictionary.md) | [dictionary.sh](dictionary.sh) | Bash dictionary.\n[Environment File](doc/env.md) | [env.sh](env.sh) | Environment file reader.\n[Message](doc/message.md) | [message.sh](message.sh) | Show color message in shell.\n[Network](doc/network.md) | [network.sh](network.sh) | Network utility.\n[String](doc/string.md) | [string.sh](string.sh) | String manipulation.\n\n## Configuration\n\nThe following environment variables can be used to configure the behaviour of the library.\n\n### Debug mode\n\nSet environment variable `LIB_BASH_DEBUG` to true to show error message in `stderr` when function get error.\n\n### Error message colors\n\nSet environment variable `LIB_BASH_ERROR_FG` and `LIB_BASH_ERROR_BG` to change the foreground and background color respectively of error message, default is white and red, see [ANSI escape code#Colors](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors).\n\n### Information message color\n\nSet environment variable `LIB_BASH_INFO_COLOR` to change the color of infomration message, default is green, see [ANSI escape code#Colors](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors).\n\n### Question message color\n\nSet environment variable `LIB_BASH_QUESTION_COLOR` to change the color of question message, default is cyan, see [ANSI escape code#Colors](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors).\n\n## Error codes\n\nAll functions may return the following error codes.\n\nCode | Error\n----- | -----\n65 | Invalid parameters.\n66 | Invalid options.\n67 | No outputs.\n68 | File does not exist.\n69 | Internal error.\n70 | Invalid regular expression.\n71 | Command not found.\n\n## Version History\n\n### 0.9.0\n* `local_ip` for getting the IPv4 IP from command `ifconfig`\n* Dictionary for Bash 3.x and up.\n\n### 0.7.0\n* `select_option` to let user to choose option from given array.\n\n### 0.6.0\n* `match_string` for testing string that matches give regular expression.\n* `regex_string` for finding the matched pattern and capture groups.\n* `replace_string` for replacing string with regular expression.\n* Fix wrong output for newline character.\n* Fix wrong output for trailing newline.\n* Fix wrong output for empty string input.\n* Fix wrong output for UTF-8.\n\n### 0.5.2\n\n* `implode_string` for imploding array to string and `explode_string` for exploding string to array.\n* `load_env_file` to read environment variables file.\n* Add `escape_string`.\n* Message module for printing colour string.\n* Fix skipping the unexpected options for `get_option`.\n* Fix `get_option` cannot handle special characters ‘“\\$’.\n* Fix cannot print colour string.\n\n### 0.1.0\n\n* Add `get_option` to simulate the built-in function `getopt`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faludirk%2Fbash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faludirk%2Fbash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faludirk%2Fbash/lists"}