Skip to content

cybersamx/bash-recipes

Repository files navigation

Collection of Bash Recipes

A collection of Bash scripts/recipes. My handy guide for Bash.

Recipes

  • Basics - Bash basics.
  • Exit code conditional - Check the exit code of a command execution.
  • In-place file edit - Edit the content of a file eg. change a line, remove a line, etc. Useful for dynamically changing the content of a file.
  • Pretty print - Print text with color.
  • Set trap - Examines the use of the trap command and how it is used to handle a system signal like SIGTERM and SIGINT.
  • Wait for TCP port - Connects to a TCP port using the nc command in every x seconds for n tries.
  • Working diretory - Get the path of a working directory.

Right now, these bash recipes are specific to MacOS.

Releases

No releases published

Packages

No packages published

Languages