Bash is not just a shell that’s only on Linux/Mac, with WSL it is also available on Windows. The shell has been around since 1989 and documentation is plenty. The shell’s name is an acronym for Bourne-again shell, a pun on the name of the Bourne shell that it replaces and on the common term “born again”.
I’m working on a project that turns GitOps data into APIs using Bash, JQ, and YQ. After reviewing GitHub connection options, I found SSH works best for local development, while GitHub App tokens are ideal for containers. Here’s how to use Bash to authenticate with the GitHub CLI and clone repositories using either method.
Currently I’m working on a small WordPress plugin that does syntax highlighting. I have the need to ship some maintenance scripts with my Dev Containers. I want some aliases to interact with the scripts (instead of calling them through /scripts/actions.sh. This solution uses a Bash startup file and a custom Dockerfile.
When you host a WordPress website, you might need to have FTP access. If you do FTP, why not SFTP (which uses SSH to do a secure transfer)? It is fully supported by FileZilla. Let’s create a script that does the setup of the new SFTP user. As we’re using WordOps, we’ll grand the new user rights on our /var/www directory.
At Wehkamp we use many – many – buckets! To do FinOps correctly, it is important we’re able to determine which teams own which buckets. In this article I’ll discuss how to detect Team tags that are not correct and apply the correct ones. We’re using a combination of Bash, AWS CLI, CSV and JQ.
We’re currently in the business of moving from Mesos/Marathon to Kubernetes. As we have a microservices environment we can move service by service. We have multiple clusters running, so I need to track which teams have which services (still) running on Mesos/Marathon.
Let’s see if we can lift the data out of the system using the Marathon API, JQ and cURL.
When working on Bash scripts, it is often useful to make them more flexible by using parameters. In a previous blog post, I demonstrated how to add named parameters to a single script. However, if you want to apply this feature to multiple script files, it might make sense to move the code to a […]
Let’s face it, using positional arguments like $1 and $2 for your arguments is not very descriptive and not very flexible. There is a better way to supply arguments: with this simple trick you’ll get named arguments in your-script, which is way better 🤓.
At Wehkamp we use Redis a lot. It is fast, available and implemented as a managed AWS service called ElastiCache. Sometimes we need to extract data from Redis, and usually I use the redis-cli to interact from the command-line. But what if you need to get the values of 400k+ keys? What would you do? Is there an effective way to query multiple key/values from Redis?
This week I needed to query an ElastiCache instance on AWS – which is Amazons version of Redis. I could not find a decent free client to query this remote dictionary, so I ended up using redis-cli on Ubuntu. Turns out: Redis is a wonderful and powerful system to work with.