{"id":13683102,"url":"https://github.com/wklken/bash-utils","last_synced_at":"2026-03-01T06:35:53.541Z","repository":{"id":45000429,"uuid":"76089909","full_name":"wklken/bash-utils","owner":"wklken","description":"utils for shell","archived":false,"fork":false,"pushed_at":"2021-10-22T12:06:14.000Z","size":15,"stargazers_count":80,"open_issues_count":3,"forks_count":19,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-08T08:46:23.134Z","etag":null,"topics":["bash","functions","short-and-clear","template","utils"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wklken.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-10T04:15:41.000Z","updated_at":"2024-10-06T02:12:59.000Z","dependencies_parsed_at":"2022-08-30T07:30:21.799Z","dependency_job_id":null,"html_url":"https://github.com/wklken/bash-utils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wklken/bash-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wklken%2Fbash-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wklken%2Fbash-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wklken%2Fbash-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wklken%2Fbash-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wklken","download_url":"https://codeload.github.com/wklken/bash-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wklken%2Fbash-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29962030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T05:59:08.471Z","status":"ssl_error","status_checked_at":"2026-03-01T05:58:04.208Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bash","functions","short-and-clear","template","utils"],"created_at":"2024-08-02T13:02:00.373Z","updated_at":"2026-03-01T06:35:53.518Z","avatar_url":"https://github.com/wklken.png","language":"Shell","readme":"# bash-utils\n\nsome utils for bash script.\n\n# intro\n\nI always use the bash as my devops script, while it's boring to write the condition judgement/echo statement/exit.\n\nSo, I want to make the bash script short and clear.\n\nI have collected some useful functions into this repo, which save me a lot of time in the past few years.\n\nJust source the `utils.sh` and write the code calling the functions.\n\nYou can just focus on the logical, not the bash syntax and expression\n\n# example\n\n```bash\necho_separator\n\necho_step \"1. begin to validate the params\"\n\nif_empty_then_exit \"$1\" \"the first param required!\"\nFILE=\"${1}\"\nif_path_not_exist_then_exit \"${FILE}\" \"file not exist\"\n\nVALUE=$(if_empty_return_default \"${2}\" 123)\n```\n\n# usage\n\n\n```bash\ncurl https://raw.githubusercontent.com/wklken/bash-utils/master/utils.sh \u003e utils.sh \u0026\u0026 curl https://raw.githubusercontent.com/wklken/bash-utils/master/template.sh \u003e run.sh\n```\n\n# Donation\n\nYou can Buy me a coffee:)  [link](http://www.wklken.me/pages/donation.html)\n\n\n# change log\n\n2018-06-30 add some useful function from [pure-bash-bible](https://github.com/dylanaraps/pure-bash-bible)\n\n------------------------\n------------------------\n\nwklken\n\nGithub: https://github.com/wklken\n\nBlog: [http://www.wklken.me](http://www.wklken.me)\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwklken%2Fbash-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwklken%2Fbash-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwklken%2Fbash-utils/lists"}