Commands
Complete reference guide for all Bash Tools commands
This is a collection of several bash tools using bash tools framework allowing to easily import bash script, log, display log messages, database manipulation, user interaction, version comparison, …
List of tools:
clone this repository and create configuration files in your home directory alternatively you can use the install script
git clone git@github.com:fchastanet/bash-tools.git
cd bash-tools
./install
The following structure will be created in your home directory
~/.bash-tools/
├── cliProfiles
│ ├── default.sh
│ ├── mysql.remote.sh
│ ├── mysql.sh
├── dbImportDumps
├── dbImportProfiles
│ ├── all.sh
│ ├── default.sh
│ ├── none.sh
├── dbQueries
│ └── databaseSize.sql
├── dsn
│ └── default.local.env
│ └── default.remote.env
│ └── localhost-root.env
└── .env
Some tools need GNU parallel software, it allows running multiple processes in parallel. You can install it running
sudo apt update
sudo apt install -y parallel
# remove parallel nagware
mkdir ~/.parallel
touch ~/.parallel/will-cite
Dependencies are automatically installed when used.
bin/installRequirements script will install the following libraries inside vendor folder:
bin/doc script will install:
To avoid checking for libraries update and have an impact on performance, a file is created in vendor dir.
vendor/.tomdocInstalledvendor/.batsInstalled You can remove these files to force the update of the libraries, or just wait 24 hours that
the timeout expires.This repository uses pre-commit software to ensure every commits respects a set of rules specified by the
.pre-commit-config.yaml file. It supposes pre-commit software is installed in your
environment.
You also have to execute the following command to enable it:
pre-commit install --hook-type pre-commit --hook-type pre-push
export FRAMEWORK_ROOT_DIR=/home/wsl/fchastanet/bash-tools/vendor/bash-tools-framework
export BASH_TOOLS_ROOT_DIR=/home/wsl/fchastanet/bash-tools
go run ./cmd/bash-compiler $(find "${BASH_TOOLS_ROOT_DIR}/src/_binaries" -name '*-binary.yaml' -print)
All the commands are unit tested, you can run the unit tests using the following command
./test.sh -r src
Launch UT on different environments:
./test.sh scrasnups/build:bash-tools-ubuntu-4.4 -r src -j 30
./test.sh scrasnups/build:bash-tools-ubuntu-5.0 -r src -j 30
./test.sh scrasnups/build:bash-tools-ubuntu-5.3 -r src -j 30
./test.sh scrasnups/build:bash-tools-alpine-4.4 -r src -j 30
./test.sh scrasnups/build:bash-tools-alpine-5.0 -r src -j 30
./test.sh scrasnups/build:bash-tools-alpine-5.3 -r src -j 30
generated by running
./bin/doc
The web page uses Docsy to generate a static web site.
| Title | Description | Updated |
|---|---|---|
| Commands | Complete reference guide for all Bash Tools commands | 2026-02-15 |
Complete reference guide for all Bash Tools commands