These are just some quick notes I jotted down when looking at https://github.com/WoozyMasta/kube-dump/blob/master/kube-dump, theres lots of cool little tricks within the initilization of the script.
#!/usr/bin/env bash
- Running
/usr/bin/env bash
looks for the default version of the program in your environment. This way ifbash
is not in the default/bin/bash
location (such as on [[nixos]]), it will still find bash.- Interestingly, there is a small security concern. If someone can get their exectuable for bash in your path it might be executed