Tag Archives: bash

Bash Quirks: understanding behavior of set -e

There is one bash quirk I just learnt today and that caused me fair amount of debugging. In summary when you use the set -e option in bash, any function that returns a non-zero exit code will cause your script … Continue reading

Posted in Software | Tagged | Leave a comment

How to check in Bash script if a Docker volume does not exist

Sometimes you may want to check if a Docker volume exists or not in a Bash script: To check existence of a Docker volume we can use the docker volume ls command with the name option but there are several … Continue reading

Posted in Software | Tagged , | 1 Comment

Bash script to upgrade a Docker container

Problem: We have an application that has a single instance and runs in a Docker container and further uses a swarm network. We want to write a bash script using which we can deploy new version of the application. The … Continue reading

Posted in Software | Tagged , | Leave a comment

Installing Bash4

A new macbook pro comes installed with bash version 3. I needed to install bash 4 to be able to use the bash debug vs code extension. To do this run brew install bash once its done you will need … Continue reading

Posted in Computers, programming, Software | Tagged | Leave a comment

Linux & Bash Tips

Normally by itself the terminal app displays bash in the tab title and its not very useful if you have a large number of tabs open and want to know e.g., what is the pwd in each of the tabs. … Continue reading

Posted in programming, Software | Tagged , , | Leave a comment