Remove more unused scripts

This commit is contained in:
2022-08-15 20:37:03 +08:00
parent 824fcee942
commit 4f8e48cea3
21 changed files with 22 additions and 179 deletions

19
bash/sources/12_shortcuts Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
function sanitize-perms {
chown $USER.$USER . -R
find . -type d -exec chmod 755 {}\;
find . -type f -exec chmod 644 {}\;
}
# Kubernetes
function kres {
local _O _D
_O="-ocustom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name"
_D="[0-9A-Za-z\-]"
if [ -z "$3" ]; then
kubectl get $1 -A $_O | grep "$2"
else
kubectl get $1 -A $_O | grep "$_D*$2$_D*\s\+$_D*$3$_D*"
fi
}