Bash

Using here documents in a Pinch

Imagine you're working in a Kubernetes environment and need to troubleshoot an issue with a PHP application running in one of your pods. You exec into the pod to investigate, but to your surprise, there are no text editors installed. This is common in container images designed to reduce attack surfaces and resource usage. However, you need to create a PHP file to test some code changes. You can do that with here documents.

July 13, 2024 by Sharjeel Aziz6 minutes

Enhancing Bash Script Reliability with set -xeuo pipefail

Bash scripts are an essential tool for automating tasks and streamlining workflows and there are some key commands that can enhance the reliability, security, and debuggability of your scripts.

April 7, 2024 by Sharjeel Aziz5 minutes