Skip to content

Chemaclass/bash-dumper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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-dumper
curl -L https://github.com/Chemaclass/bash-dumper/releases/download/0.1/dumper.sh \
  -o src/dev/dumper.sh
  1. Import the file into your main script
declare ROOT_DIR="$(dirname "${BASH_SOURCE[0]}")"
source "$ROOT_DIR/src/dumper.sh"
  1. now you have access to all functions inside dumper.sh⚡️

Example: Chemaclass/bash-skeleton


Original idea developed in TypedDevs/bashunit#286