https://github.com/chemaclass/bash-dumper
An alternative to echo when debugging.
https://github.com/chemaclass/bash-dumper
bash bashunit debug
Last synced: 10 months ago
JSON representation
An alternative to echo when debugging.
- Host: GitHub
- URL: https://github.com/chemaclass/bash-dumper
- Owner: Chemaclass
- Created: 2024-07-14T16:38:15.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-05T09:00:58.000Z (over 1 year ago)
- Last Synced: 2024-12-16T15:17:17.915Z (over 1 year ago)
- Topics: bash, bashunit, debug
- Language: Shell
- Homepage:
- Size: 28.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bash dumper
A collection of debugging functions in bash.
- **dump**: an alternative to echo when debugging.
- **dd**: dump and die.
## How to use?
1. Copy-paste the function that you want to use into your script.
or
1. Copy-paste the entire file `src/dumper.sh` or download it:
```bash
# bash-dumper
curl -L https://github.com/Chemaclass/bash-dumper/releases/download/0.1/dumper.sh \
-o src/dev/dumper.sh
```
2. Import the file into your main script
```bash
declare ROOT_DIR="$(dirname "${BASH_SOURCE[0]}")"
source "$ROOT_DIR/src/dumper.sh"
```
3. now you have access to all functions inside `dumper.sh`⚡️
> Example: [Chemaclass/bash-skeleton](https://github.com/Chemaclass/bash-skeleton/blob/main/install-dependencies.sh)
---
> Original idea developed in https://github.com/TypedDevs/bashunit/pull/286