Browsed by
Tag: script

Bash Environment Variable Functions

Bash Environment Variable Functions

A set of useful (Linux) Bash environment variable functions, taken / adapted, and added some information (not a plain copy) from blog post: https://hackaday.com/2022/01/26/linux-fu-bash-strings/ The examples below start with a $ if it is the command line, and without if it is the output (or input) of the command. Shell script command line arguments Numeric Substrings Remove leading or trailing parts Search / Replace Default values Changing case Bash built-in if tests Related external programs

Find Kubernetes Ingress Rules

Find Kubernetes Ingress Rules

Suppose you have a kubernetes cluster, which contains a large set of ingress rules, of which many are used for the same hostname (just using different context-root’s / paths). In this case it can be hard to find out which rule is used for a certain URL. To help out in this situation I have created a Linux script to make a nice overview of paths mapped to what services by which ingress rules. You still have to read through…

Read More Read More