bash-snippets

A collection of bash snippets.

https://github.com/developerstoolbox/bash-snippets

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.3%) to scientific vocabulary

Keywords

bash bash-snippets snippets wolfsoftware

Keywords from Contributors

mesh sequences interactive hacking
Last synced: 4 months ago · JSON representation ·

Repository

A collection of bash snippets.

Basic Info
  • Host: GitHub
  • Owner: DevelopersToolbox
  • License: mit
  • Language: Shell
  • Default Branch: master
  • Homepage:
  • Size: 196 KB
Statistics
  • Stars: 11
  • Watchers: 0
  • Forks: 1
  • Open Issues: 3
  • Releases: 1
Topics
bash bash-snippets snippets wolfsoftware
Created over 4 years ago · Last pushed 4 months ago
Metadata Files
Readme Contributing Funding License Code of conduct Citation Codeowners Security

README.md

DevelopersToolbox logo
Github Build Status License Created
Release Released Commits since release

Overview

This is a collection of useful(ish) bash snippets. The snippets are all simple self-contained pieces of code (a class or subroutine), but non of them are large enough to require having a repository in their own right.

Bash Snippets

| Name | Description | | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | | abs.sh | The Math. abs() function returns the absolute value of a number. That is, it returns x if x is positive or zero, and the negation of x if x is negative. | | array-contains.sh | Check to see if an array contains a specific value. | | array-to-string.sh | Convert an array to a string with a custom separator and a final optional value. | | center-text.sh | Center any given text on the screen (optional define the screen width). | | check-prerequisites.sh | Check prerequisite commands are installed. | | compare-versions.sh | Compare two version strings with optional custom delimiter. | | contains.sh | Check to see if one string contains another. | | countdown.sh | Display a simple countdown timer and message. | | error-messages.sh | Display error, warning and success messages. | | get-confirmation.sh | Get user confirmation for an action. | | get-git-root.sh | Get the root directory of a given git repo (and handle correctly when it isn't a git repo). | | get-script-info.sh | Get information about a script (full path and script name). | | get-terraform-version.sh | Get the current terraform version. | | get-version-string.sh | Extract a semver version from a string. | | is-git-repo.sh | Check if a given directory contains a git repo. | | rollingback.sh | Using signals to create rollback functions for cleaner scripting. | | stacktrace.sh | Provide a stack trace for from main to the point of of calling the stacktrace. | | strict-mode.sh | An example of a 'strict' mode setup for bash scripts. | | sudo-librarian-puppet.sh | Run librarian-puppet via sudo without changing default sudoers file (Debian 9 / Puppet 5). | | terminal-or-not.sh | A script to allow to determine if your script is attached to a terminal, pipe or redirection. | | untag.sh | A simple script to remove ALL tags from a git repo. | | using-colour.sh | An example of how to use colour (see bash-colour-include for a full working solution). | | using-set.sh | Using 'set' for more robust shell scripting. | | variable-replace.sh | Replace template variables in a file with values from an associative array. | | verbose-mode.sh | Demonstration of script wide verbose/silent mode. |


Owner

  • Name: Developers Toolbox
  • Login: DevelopersToolbox
  • Kind: organization
  • Email: github@wolfsoftware.com
  • Location: United Kingdom

A selection of tools to help developers. Created by Wolf Software.

Citation (CITATION.cff)

cff-version: 1.2.0
message: If you use this software, please cite it using these metadata.
title: Bash Snippets
abstract: A collection of bash snippets.
type: software
version: 0.1.0
date-released: 2024-06-04
repository-code: https://github.com/DevelopersToolbox/bash-snippets
keywords:
  - "Wolf Software"
  - "Software"
license: MIT
authors:
  - family-names: "Wolf"
    orcid: "https://orcid.org/0009-0007-0983-2072"

GitHub Events

Total
  • Watch event: 2
  • Delete event: 64
  • Issue comment event: 131
  • Push event: 116
  • Pull request review event: 108
  • Pull request event: 128
  • Create event: 67
Last Year
  • Watch event: 2
  • Delete event: 64
  • Issue comment event: 131
  • Push event: 116
  • Pull request review event: 108
  • Pull request event: 128
  • Create event: 67

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 94
  • Total Committers: 2
  • Avg Commits per committer: 47.0
  • Development Distribution Score (DDS): 0.011
Past Year
  • Commits: 75
  • Committers: 1
  • Avg Commits per committer: 75.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
dependabot[bot] 4****] 93
Wolf w****f@t****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 1
  • Total pull requests: 84
  • Average time to close issues: 5 minutes
  • Average time to close pull requests: about 17 hours
  • Total issue authors: 1
  • Total pull request authors: 3
  • Average comments per issue: 1.0
  • Average comments per pull request: 1.69
  • Merged pull requests: 70
  • Bot issues: 1
  • Bot pull requests: 82
Past Year
  • Issues: 1
  • Pull requests: 66
  • Average time to close issues: 5 minutes
  • Average time to close pull requests: about 22 hours
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 1.71
  • Merged pull requests: 54
  • Bot issues: 1
  • Bot pull requests: 66
Top Authors
Issue Authors
Pull Request Authors
  • dependabot[bot] (125)
  • sablokgaurav (1)
Top Labels
Issue Labels
Pull Request Labels
dependabot: dependencies (125) dependabot: ecosystem : github actions (125) dependabot: auto approve (114) dependabot: auto merge (114) dependabot: manual merge (3)

Dependencies

.github/workflows/cicd.yml actions
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
.github/workflows/citation-validation.yml actions
  • ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • citation-file-format/cffconvert-github-action 4cf11baa70a673bfdf9dad0acc7ee33b3f4b6084 composite
  • ruby/setup-ruby d5fb7a202fc07872cb44f00ba8e6197b70cb0c55 composite
.github/workflows/delete-old-workflow-runs.yml actions
  • Gamesight/slack-workflow-status 68bf00d0dbdbcb206c278399aa1ef6c14f74347a composite
  • Mattraks/delete-workflow-runs 39f0bbed25d76b34de5594dceab824811479e5de composite
.github/workflows/dependabot.yml actions
  • dependabot/fetch-metadata 5e5f99653a5b510e8555840e80cbf1514ad4af38 composite
.github/workflows/document-validation.yml actions
  • ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • actions/setup-node 60edb5dd545a775178f52524783378180af0d1f8 composite
  • ruby/setup-ruby d5fb7a202fc07872cb44f00ba8e6197b70cb0c55 composite
.github/workflows/generate-release.yml actions
  • Bullrich/generate-release-changelog 6b60f004b4bf12ff271603dc32dbd261965ad2f2 composite
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • softprops/action-gh-release 69320dbe05506a9a39fc8ae11030b214ec2d1f87 composite
.github/workflows/generate-test-release.yml actions
  • Bullrich/generate-release-changelog 6b60f004b4bf12ff271603dc32dbd261965ad2f2 composite
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • softprops/action-gh-release 69320dbe05506a9a39fc8ae11030b214ec2d1f87 composite
.github/workflows/greetings.yml actions
  • actions/first-interaction 34f15e814fe48ac9312ccf29db4e74fa767cbab7 composite
.github/workflows/purge-deprecated-workflow-runs.yml actions
  • Gamesight/slack-workflow-status 68bf00d0dbdbcb206c278399aa1ef6c14f74347a composite
  • otto-de/purge-deprecated-workflow-runs 31a4e821d43e9a354cbd65845922c76e4b4b3633 composite
.github/workflows/repository-validation.yml actions
  • ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • actions/setup-go cdcb36043654635271a94b9a6d1392de5bb323a7 composite
  • actions/setup-python 82c7e631bb3cdc910f68e0081d67478d79c6982d composite
.github/workflows/security-hardening.yml actions
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • zgosalvez/github-actions-ensure-sha-pinned-actions 2f2ebc6d914ab515939dc13f570f91baeb2c194c composite
.github/workflows/stale.yml actions
  • Gamesight/slack-workflow-status 68bf00d0dbdbcb206c278399aa1ef6c14f74347a composite
  • actions/stale 28ca1036281a5e5922ead5184a1bbf96e5fc984e composite