Shell Script

  • asdf - Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more

Cheatsheets

Check if command exists or not.

if !(command -v go); then
    # Do something 
fi

Check if folder exists or not.

if ! test -d "$BUILD_FOLDER"; then
  mkdir $BUILD_FOLDER
fi

Archive

Extract tar.gz

tar -xvzf filename.tar.gz